Хотелось бы узнать, как изображения встраиваются в докер-хаб. Я настроил автоматическую сборку с github, поэтому каждый раз, когда я нажимаю на github, Docker Hub создает новый образ. Но я не могу узнать, какие аргументы передаются команде сборки. Например, я думаю, что он вызывается с --force-rm, потому что в журнале я вижу, что после каждого шага промежуточные слои удаляются. Я хочу восстановить процесс сборки в моей локальной системе (Docker version 18.03.1-ce, build 9ee9f40
), потому что локальные мои образы собраны, а на док-концентраторе я получаю следующую ошибку:
Building in Docker Cloud's infrastructure...
Cloning into '.'...
KernelVersion: 4.4.0-93-generic
Arch: amd64
BuildTime: 2017-08-17T22:50:04.828747906+00:00
ApiVersion: 1.30
Version: 17.06.1-ce
MinAPIVersion: 1.12
GitCommit: 874a737
Os: linux
GoVersion: go1.8.3
Starting build of index.docker.io/jabaa/angular-cli:latest...
Step 1/6 : FROM node:9.11.1
---> d42348c94e97
Step 2/6 : RUN npm update -g npm@6.0.0
---> Running in 8a9a45336c6e
---> a5b1c2d5f34d
Removing intermediate container 8a9a45336c6e
Step 3/6 : RUN npm i -g yarn@1.5.1
---> Running in e8fe63a39537
/usr/local/bin/yarnpkg -> /usr/local/lib/node_modules/yarn/bin/yarn.js
/usr/local/bin/yarn -> /usr/local/lib/node_modules/yarn/bin/yarn.js
+ yarn@1.5.1
added 1 package in 2.081s
---> ed28e5dc20aa
Removing intermediate container e8fe63a39537
Step 4/6 : RUN yarn global add @angular/cli@1.7.4
---> Running in 515c038e900f
[91mcontainer_linux.go:262: starting container process caused "exec: \"yarn\": executable file not found in $PATH"
[0m
Removing intermediate container 515c038e900f
oci runtime error: container_linux.go:262: starting container process caused "exec: \"yarn\": executable file not found in $PATH"
Это журнал в моей локальной системе:
Sending build context to Docker daemon 80.38kB
Step 1/6 : FROM node:9.11.1
---> aa3e171e4e95
Step 2/6 : RUN ["npm", "update", "-g", "npm@6.0.0"]
---> Running in 345f035cc8bf
Removing intermediate container 345f035cc8bf
---> f3afe30b0623
Step 3/6 : RUN ["npm", "i", "-g", "yarn@1.5.1"]
---> Running in bb196caa2c68
/usr/local/bin/yarnpkg -> /usr/local/lib/node_modules/yarn/bin/yarn.js
/usr/local/bin/yarn -> /usr/local/lib/node_modules/yarn/bin/yarn.js
+ yarn@1.5.1
added 1 package in 0.647s
Removing intermediate container bb196caa2c68
---> e353fc928f6b
Step 4/6 : RUN ["yarn", "global", "add", "@angular/cli@1.7.4"]
---> Running in d586a40e6157
yarn global v1.5.1
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.3: The platform "linux" is incompatible with this module.
info "fsevents@1.2.3" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "@angular/cli@1.7.4" with binaries:
- ng
Done in 26.37s.
Removing intermediate container d586a40e6157
---> 663e31095604
Step 5/6 : USER node
---> Running in 7585e5fca393
Removing intermediate container 7585e5fca393
---> c61d72cc9f00
Step 6/6 : WORKDIR /home/node
Removing intermediate container 936231ce0a8c
---> afce371c0911
Successfully built afce371c0911
Это Dockerfile:
FROM node:9.11.1
RUN ["npm", "update", "-g", "npm@6.0.0"]
RUN ["npm", "i", "-g", "yarn@1.5.1"]
RUN ["yarn", "global", "add", "@angular/cli@1.7.4"]
USER node
WORKDIR /home/node