2021-03-24 21:11:14 +00:00
|
|
|
FROM ubuntu:20.04 as binaries
|
|
|
|
RUN apt update && apt install -y curl gnupg2 ca-certificates
|
|
|
|
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
|
|
|
|
RUN echo 'deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable' >> /etc/apt/sources.list
|
|
|
|
RUN curl -L https://github.com/a8m/envsubst/releases/download/v1.2.0/envsubst-`uname -s`-`uname -m` -o /usr/bin/envsubst
|
|
|
|
RUN chmod +x /usr/bin/envsubst
|
|
|
|
RUN apt update && apt install -y docker-ce-cli && apt clean all
|
|
|
|
|
|
|
|
FROM node:14 as modules
|
|
|
|
COPY --from=binaries /usr/bin/docker /usr/bin/docker
|
|
|
|
COPY --from=binaries /usr/bin/envsubst /usr/bin/envsubst
|
2021-04-06 21:22:48 +00:00
|
|
|
RUN curl -L https://pnpm.js.org/pnpm.js | node - add --global pnpm
|
2021-03-24 21:11:14 +00:00
|
|
|
WORKDIR /usr/src/app
|
|
|
|
COPY ./package*.json .
|
2021-04-06 21:22:48 +00:00
|
|
|
RUN pnpm install
|
2021-03-24 21:11:14 +00:00
|
|
|
|
|
|
|
FROM modules
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
COPY . .
|