mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 06:56:24 +00:00
b8c6303d0c
build: update Docker to 19.03.1
69 lines
1.3 KiB
Text
69 lines
1.3 KiB
Text
# Base image
|
|
#============
|
|
FROM renovate/yarn:1.17.3@sha256:08571fc2c7f5a213f25df2b10f393ff6ea296341129466ac661d228dbc1f92ca AS base
|
|
|
|
LABEL maintainer="Rhys Arkins <rhys@arkins.net>"
|
|
LABEL name="renovate"
|
|
LABEL org.opencontainers.image.source="https://github.com/renovatebot/renovate"
|
|
|
|
WORKDIR /usr/src/app/
|
|
|
|
# required for install
|
|
USER root
|
|
|
|
RUN chown -R ubuntu:ubuntu /usr/src/app/
|
|
|
|
# and back to normal
|
|
USER ubuntu
|
|
|
|
# Build image
|
|
#============
|
|
FROM base as tsbuild
|
|
|
|
COPY package.json .
|
|
COPY yarn.lock .
|
|
RUN yarn install --frozen-lockfile
|
|
|
|
COPY lib lib
|
|
COPY tsconfig.json tsconfig.json
|
|
COPY tsconfig.app.json tsconfig.app.json
|
|
|
|
RUN yarn build:docker
|
|
|
|
|
|
# Final image
|
|
#============
|
|
FROM base as final
|
|
|
|
|
|
# required for install
|
|
USER root
|
|
|
|
# Docker client and group
|
|
|
|
RUN groupadd -g 999 docker
|
|
RUN usermod -aG docker ubuntu
|
|
|
|
ENV DOCKER_VERSION=19.03.1
|
|
|
|
RUN curl -fsSLO https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VERSION}.tgz \
|
|
&& tar xzvf docker-${DOCKER_VERSION}.tgz --strip 1 \
|
|
-C /usr/local/bin docker/docker \
|
|
&& rm docker-${DOCKER_VERSION}.tgz
|
|
|
|
|
|
# and back to normal
|
|
USER ubuntu
|
|
|
|
|
|
COPY package.json .
|
|
COPY yarn.lock .
|
|
RUN yarn install --production --frozen-lockfile
|
|
COPY --from=tsbuild /usr/src/app/dist dist
|
|
COPY bin bin
|
|
COPY data data
|
|
|
|
ENV RENOVATE_BINARY_SOURCE=docker
|
|
|
|
ENTRYPOINT ["node", "/usr/src/app/dist/renovate.js"]
|
|
CMD []
|