./
RUN npm install -g pm2
RUN npm install
COPY . .
RUN npm run build
EXPOSE 3001
CMD [ "npm", "run", "deploy-linux" ]
Собираю так
docker build . -t deva-pagebuilder -f /home/worker/deva/pagebuilder/Dockerfile2
А лог сборки такой => две последние команды не выполняются во время сборки.
[+] Building 29.1s (13/13) FINISHED
=> [internal] load build definition from Dockerfile2 0.0s
=> => transferring dockerfile: 220B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 34B 0.0s
=> [internal] load metadata for docker.io/library/node:14-buster 2.4s
=> [auth] library/node:pull token for registry-1.docker.io 0.0s
=> [1/7] FROM docker.io/library/node:14-buster@sha256:cb336db6f0ab242a02a812197c739e6faad19daffcd461763ab28044c751879e 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 5.13kB 0.0s
=> CACHED [2/7] WORKDIR /usr/app 0.0s
=> CACHED [3/7] COPY package*.json ./ 0.0s
=> CACHED [4/7] RUN npm install -g pm2 0.0s
=> CACHED [5/7] RUN npm install 0.0s
=> [6/7] COPY . . 0.0s
=> [7/7] RUN npm run build 26.4s
=> exporting to image 0.1s
=> => exporting layers 0.1s
=> => writing image sha256:792710eb24efa4598ceb2dfaa4ea4ee46fc52e5b2f760551d84350d45f781fa3 0.0s
=> => naming to docker.io/library/deva-pagebuilder 0.0s
точняк, перегрев :)
Обсуждают сегодня