Спасибо, что мне сообщили, что на данный момент я застрял на некоторое время с проблемой, которая возникает при попытке запустить контейнер для проекта веб-интерфейса, написанного в ioni c framework.
Я поделюсь с вами все журналы, связанные с этой проблемой.
Я начинаю с запуска -> npm i для установки зависимостей
> node-sass@4.12.0 install /home/altour/udacityUdagram/cloud-developer/course-03/exercises/udacity-c3-frontend/node_modules/node-sass
> node scripts/install.js
Cached binary found at /home/altour/.npm/node-sass/4.12.0/linux-x64-72_binding.node
> core-js@2.6.9 postinstall /home/altour/udacityUdagram/cloud-developer/course-03/exercises/udacity-c3-frontend/node_modules/core-js
> node scripts/postinstall || echo "ignore"
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
> node-sass@4.12.0 postinstall /home/altour/udacityUdagram/cloud-developer/course-03/exercises/udacity-c3-frontend/node_modules/node-sass
> node scripts/build.js
Binary found at /home/altour/udacityUdagram/cloud-developer/course-03/exercises/udacity-c3-frontend/node_modules/node-sass/vendor/linux-x64-72/binding.node
Testing binary
Binary is fine
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
added 1163 packages from 1042 contributors and audited 53095 packages in 100.329s
found 3025 vulnerabilities (2253 low, 5 moderate, 767 high)
run `npm audit fix` to fix them, or `npm audit` for details
Затем я запускаю ioni c serve, который работает без при возникновении проблем и генерации внешнего интерфейса, как показано ниже:
> ng run app:serve --host=localhost --port=8100
[INFO] Waiting for connectivity with ng...
[INFO] Waiting for connectivity with ng...
[INFO] Waiting for connectivity with ng...
[INFO] Waiting for connectivity with ng...
[INFO] Waiting for connectivity with ng...
[INFO] Waiting for connectivity with ng...
[INFO] Waiting for connectivity with ng...
[INFO] Development server running!
Local: http://localhost:8100
Use Ctrl+C to quit this process
[INFO] Browser window opened to http://localhost:8100!
[ng] Browserslist: caniuse-lite is outdated. Please run next command `npm update`
[ng] ℹ 「wdm」: wait until bundle finished: /
[ng] Date: 2020-03-31T09:50:38.687Z
[ng] Hash: fa21427ee95b0ad32f3d
[ng] Time: 98276ms
[ng] chunk {common} common.js, common.js.map (common) 20.2 kB [rendered]
[ng] chunk {es2015-polyfills} es2015-polyfills.js, es2015-polyfills.js.map (es2015-polyfills) 285 kB [initial] [rendered]
[ng] chunk {home-home-module} home-home-module.js, home-home-module.js.map (home-home-module) 31.5 kB [rendered]
[ng] chunk {main} main.js, main.js.map (main) 73.3 kB [initial] [rendered]
[ng] chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 237 kB [initial] [rendered]
[ng] chunk {runtime} runtime.js, runtime.js.map (runtime) 8.79 kB [entry] [rendered]
[ng] chunk {styles} styles.js, styles.js.map (styles) 86.8 kB [initial] [rendered]
[ng] chunk {vendor} vendor.js, vendor.js.map (vendor) 4.46 MB [initial] [rendered]
[INFO] ... and 173 additional chunks
[ng] ℹ 「wdm」: Compiled successfully.
, затем я запускаю ---> docker build -t ahmedaltour / udacity-frontend. для построения docker image
Sending build context to Docker daemon 423.4MB
Step 1/8 : FROM beevelop/ionic AS ionic
---> cda84d74c103
Step 2/8 : WORKDIR /usr/src/app
---> Running in ae1313b37eca
Removing intermediate container ae1313b37eca
---> 1102266f0af9
Step 3/8 : COPY package*.json ./
---> 909e6e3503b5
Step 4/8 : RUN npm ci
---> Running in 64373e381d59
> fsevents@1.2.9 install /usr/src/app/node_modules/fsevents
> node install
> core-js@2.6.9 postinstall /usr/src/app/node_modules/core-js
> node scripts/postinstall || echo "ignore"
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
> node-sass@4.12.0 install /usr/src/app/node_modules/node-sass
> node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.12.0/linux-x64-64_binding.node
Download complete
Binary saved to /usr/src/app/node_modules/node-sass/vendor/linux-x64-64/binding.node
> node-sass@4.12.0 postinstall /usr/src/app/node_modules/node-sass
> node scripts/build.js
Binary found at /usr/src/app/node_modules/node-sass/vendor/linux-x64-64/binding.node
Testing binary
Binary is fine
added 1164 packages in 86.109s
Removing intermediate container 64373e381d59
---> 4db72d5775dd
Step 5/8 : COPY . .
---> 0b0d217e7222
Step 6/8 : RUN ionic build
---> Running in 6f03bb842f8f
> ng run app:build
Browserslist: caniuse-lite is outdated. Please run next command `npm update`
Date: 2020-03-31T10:05:12.802Z
Hash: 3e9ea5a461d01d4feaf1
Time: 41502ms
chunk {0} 0.js, 0.js.map () 16.4 kB [rendered]
chunk {1} 1.js, 1.js.map () 12.9 kB [rendered]
chunk {2} 2.js, 2.js.map () 17.3 kB [rendered]
chunk {3} 3.js, 3.js.map () 5.48 kB [rendered]
chunk {4} 4.js, 4.js.map () 1.4 kB [rendered]
chunk {5} 5.js, 5.js.map () 1.45 kB [rendered]
chunk {6} 6.js, 6.js.map () 3.22 kB [rendered]
chunk {7} 7.js, 7.js.map () 1000 bytes [rendered]
chunk {8} 8.js, 8.js.map () 1.73 kB [rendered]
chunk {9} 9.js, 9.js.map () 93.8 kB [rendered]
chunk {10} 10.js, 10.js.map () 31.4 kB [rendered]
chunk {11} 11.js, 11.js.map () 33 kB [rendered]
chunk {12} 12.js, 12.js.map () 25.7 kB [rendered]
chunk {13} 13.js, 13.js.map () 26.6 kB [rendered]
chunk {14} 14.js, 14.js.map () 24.7 kB [rendered]
chunk {15} 15.js, 15.js.map () 26.1 kB [rendered]
chunk {16} 16.js, 16.js.map () 23.9 kB [rendered]
chunk {17} 17.js, 17.js.map () 23.9 kB [rendered]
chunk {18} 18.js, 18.js.map () 32.5 kB [rendered]
chunk {19} 19.js, 19.js.map () 33.6 kB [rendered]
chunk {20} 20.js, 20.js.map () 33.7 kB [rendered]
chunk {21} 21.js, 21.js.map () 34.2 kB [rendered]
chunk {22} 22.js, 22.js.map () 30 kB [rendered]
chunk {23} 23.js, 23.js.map () 31.1 kB [rendered]
chunk {24} 24.js, 24.js.map () 31.5 kB [rendered]
chunk {25} 25.js, 25.js.map () 32 kB [rendered]
chunk {26} 26.js, 26.js.map () 30.4 kB [rendered]
chunk {27} 27.js, 27.js.map () 30.4 kB [rendered]
chunk {28} 28.js, 28.js.map () 23.6 kB [rendered]
chunk {29} 29.js, 29.js.map () 24.4 kB [rendered]
chunk {30} 30.js, 30.js.map () 23.4 kB [rendered]
chunk {31} 31.js, 31.js.map () 24.2 kB [rendered]
chunk {32} 32.js, 32.js.map () 25.5 kB [rendered]
chunk {33} 33.js, 33.js.map () 25.6 kB [rendered]
chunk {34} 34.js, 34.js.map () 25.6 kB [rendered]
chunk {35} 35.js, 35.js.map () 25.7 kB [rendered]
chunk {36} 36.js, 36.js.map () 23.9 kB [rendered]
chunk {37} 37.js, 37.js.map () 23.9 kB [rendered]
chunk {38} 38.js, 38.js.map () 42.3 kB [rendered]
chunk {39} 39.js, 39.js.map () 43.2 kB [rendered]
chunk {40} 40.js, 40.js.map () 21.3 kB [rendered]
chunk {41} 41.js, 41.js.map () 21.9 kB [rendered]
chunk {42} 42.js, 42.js.map () 25.7 kB [rendered]
chunk {43} 43.js, 43.js.map () 26.6 kB [rendered]
chunk {44} 44.js, 44.js.map () 33.6 kB [rendered]
chunk {45} 45.js, 45.js.map () 34 kB [rendered]
chunk {46} 46.js, 46.js.map () 32.8 kB [rendered]
chunk {47} 47.js, 47.js.map () 32.8 kB [rendered]
chunk {48} 48.js, 48.js.map () 21.4 kB [rendered]
chunk {49} 49.js, 49.js.map () 22 kB [rendered]
chunk {50} 50.js, 50.js.map () 31.6 kB [rendered]
chunk {51} 51.js, 51.js.map () 32.1 kB [rendered]
chunk {52} 52.js, 52.js.map () 32.4 kB [rendered]
chunk {53} 53.js, 53.js.map () 33.5 kB [rendered]
chunk {54} 54.js, 54.js.map () 42.5 kB [rendered]
chunk {55} 55.js, 55.js.map () 43.3 kB [rendered]
chunk {56} 56.js, 56.js.map () 24.1 kB [rendered]
chunk {57} 57.js, 57.js.map () 25 kB [rendered]
chunk {58} 58.js, 58.js.map () 33.5 kB [rendered]
chunk {59} 59.js, 59.js.map () 33.5 kB [rendered]
chunk {60} 60.js, 60.js.map () 22.8 kB [rendered]
chunk {61} 61.js, 61.js.map () 22.8 kB [rendered]
chunk {62} 62.js, 62.js.map () 46.5 kB [rendered]
chunk {63} 63.js, 63.js.map () 46.5 kB [rendered]
chunk {64} 64.js, 64.js.map () 15.9 kB [rendered]
chunk {65} 65.js, 65.js.map () 16.1 kB [rendered]
chunk {66} 66.js, 66.js.map () 22.8 kB [rendered]
chunk {67} 67.js, 67.js.map () 23.1 kB [rendered]
chunk {68} 68.js, 68.js.map () 22.4 kB [rendered]
chunk {69} 69.js, 69.js.map () 22.7 kB [rendered]
chunk {70} 70.js, 70.js.map () 25.4 kB [rendered]
chunk {71} 71.js, 71.js.map () 27.2 kB [rendered]
chunk {72} 72.js, 72.js.map () 25.8 kB [rendered]
chunk {73} 73.js, 73.js.map () 27.3 kB [rendered]
chunk {74} 74.js, 74.js.map () 16.6 kB [rendered]
chunk {75} 75.js, 75.js.map () 16.9 kB [rendered]
chunk {76} 76.js, 76.js.map () 16.6 kB [rendered]
chunk {77} 77.js, 77.js.map () 16.9 kB [rendered]
chunk {78} 78.js, 78.js.map () 16 kB [rendered]
chunk {79} 79.js, 79.js.map () 16.1 kB [rendered]
chunk {80} 80.js, 80.js.map () 17.6 kB [rendered]
chunk {81} 81.js, 81.js.map () 18 kB [rendered]
chunk {82} 82.js, 82.js.map () 24.9 kB [rendered]
chunk {83} 83.js, 83.js.map () 27.8 kB [rendered]
chunk {84} 84.js, 84.js.map () 26.9 kB [rendered]
chunk {85} 85.js, 85.js.map () 28.8 kB [rendered]
chunk {86} 86.js, 86.js.map () 25.2 kB [rendered]
chunk {87} 87.js, 87.js.map () 28 kB [rendered]
chunk {88} 88.js, 88.js.map () 22.2 kB [rendered]
chunk {89} 89.js, 89.js.map () 22.3 kB [rendered]
chunk {90} 90.js, 90.js.map () 49.9 kB [rendered]
chunk {91} 91.js, 91.js.map () 52.4 kB [rendered]
chunk {92} 92.js, 92.js.map () 46.3 kB [rendered]
chunk {93} 93.js, 93.js.map () 48.4 kB [rendered]
chunk {94} 94.js, 94.js.map () 12.9 kB [rendered]
chunk {95} 95.js, 95.js.map () 13 kB [rendered]
chunk {96} 96.js, 96.js.map () 26.6 kB [rendered]
chunk {97} 97.js, 97.js.map () 28.2 kB [rendered]
chunk {98} 98.js, 98.js.map () 46.5 kB [rendered]
chunk {99} 99.js, 99.js.map () 46.5 kB [rendered]
chunk {100} 100.js, 100.js.map () 29.9 kB [rendered]
chunk {101} 101.js, 101.js.map () 30 kB [rendered]
chunk {102} 102.js, 102.js.map () 16.6 kB [rendered]
chunk {103} 103.js, 103.js.map () 16.6 kB [rendered]
chunk {104} 104.js, 104.js.map () 6.43 kB [rendered]
chunk {105} 105.js, 105.js.map () 6.5 kB [rendered]
chunk {106} 106.js, 106.js.map () 17.5 kB [rendered]
chunk {107} 107.js, 107.js.map () 17.6 kB [rendered]
chunk {108} 108.js, 108.js.map () 6.43 kB [rendered]
chunk {109} 109.js, 109.js.map () 6.51 kB [rendered]
chunk {110} 110.js, 110.js.map () 44 kB [rendered]
chunk {111} 111.js, 111.js.map () 44.5 kB [rendered]
chunk {112} 112.js, 112.js.map () 44.4 kB [rendered]
chunk {113} 113.js, 113.js.map () 44.8 kB [rendered]
chunk {114} 114.js, 114.js.map () 19.8 kB [rendered]
chunk {115} 115.js, 115.js.map () 19.8 kB [rendered]
chunk {116} 116.js, 116.js.map () 16.6 kB [rendered]
chunk {117} 117.js, 117.js.map () 16.6 kB [rendered]
chunk {118} 118.js, 118.js.map () 19.4 kB [rendered]
chunk {119} 119.js, 119.js.map () 19.4 kB [rendered]
chunk {120} 120.js, 120.js.map () 17.5 kB [rendered]
chunk {121} 121.js, 121.js.map () 17.6 kB [rendered]
chunk {122} 122.js, 122.js.map () 17.8 kB [rendered]
chunk {123} 123.js, 123.js.map () 17.9 kB [rendered]
chunk {124} 124.js, 124.js.map () 13.7 kB [rendered]
chunk {125} 125.js, 125.js.map () 13.8 kB [rendered]
chunk {126} 126.js, 126.js.map () 19.4 kB [rendered]
chunk {127} 127.js, 127.js.map () 19.4 kB [rendered]
chunk {128} 128.js, 128.js.map () 10.4 kB [rendered]
chunk {129} 129.js, 129.js.map () 10.4 kB [rendered]
chunk {130} 130.js, 130.js.map () 27.4 kB [rendered]
chunk {131} 131.js, 131.js.map () 28.1 kB [rendered]
chunk {132} 132.js, 132.js.map () 10.8 kB [rendered]
chunk {133} 133.js, 133.js.map () 10.8 kB [rendered]
chunk {134} 134.js, 134.js.map () 17.3 kB [rendered]
chunk {135} 135.js, 135.js.map () 17.3 kB [rendered]
chunk {136} 136.js, 136.js.map () 4.24 kB [rendered]
chunk {137} 137.js, 137.js.map () 1.6 kB [rendered]
chunk {138} 138.js, 138.js.map () 24.5 kB [rendered]
chunk {139} 139.js, 139.js.map () 24.5 kB [rendered]
chunk {140} 140.js, 140.js.map () 2.83 kB [rendered]
chunk {141} 141.js, 141.js.map () 2.88 kB [rendered]
chunk {142} 142.js, 142.js.map () 4.43 kB [rendered]
chunk {143} 143.js, 143.js.map () 4.45 kB [rendered]
chunk {144} 144.js, 144.js.map () 10.7 kB [rendered]
chunk {145} 145.js, 145.js.map () 10.8 kB [rendered]
chunk {146} 146.js, 146.js.map () 4.44 kB [rendered]
chunk {147} 147.js, 147.js.map () 4.45 kB [rendered]
chunk {148} 148.js, 148.js.map () 10.1 kB [rendered]
chunk {149} 149.js, 149.js.map () 10.2 kB [rendered]
chunk {150} 150.js, 150.js.map () 13 kB [rendered]
chunk {151} 151.js, 151.js.map () 13 kB [rendered]
chunk {152} 152.js, 152.js.map () 27.6 kB [rendered]
chunk {153} 153.js, 153.js.map () 28.4 kB [rendered]
chunk {154} 154.js, 154.js.map () 14.3 kB [rendered]
chunk {155} 155.js, 155.js.map () 14.5 kB [rendered]
chunk {156} 156.js, 156.js.map () 14.4 kB [rendered]
chunk {157} 157.js, 157.js.map () 15.1 kB [rendered]
chunk {158} 158.js, 158.js.map () 14.4 kB [rendered]
chunk {159} 159.js, 159.js.map () 14.4 kB [rendered]
chunk {160} 160.js, 160.js.map () 24.4 kB [rendered]
chunk {161} 161.js, 161.js.map () 24.5 kB [rendered]
chunk {162} 162.js, 162.js.map () 15.1 kB [rendered]
chunk {163} 163.js, 163.js.map () 15.8 kB [rendered]
chunk {164} 164.js, 164.js.map () 13.6 kB [rendered]
chunk {165} 165.js, 165.js.map () 13.6 kB [rendered]
chunk {166} 166.js, 166.js.map () 3.08 kB [rendered]
chunk {167} 167.js, 167.js.map () 12 kB [rendered]
chunk {168} 168.js, 168.js.map () 14.6 kB [rendered]
chunk {169} 169.js, 169.js.map () 7.92 kB [rendered]
chunk {170} 170.js, 170.js.map () 1.63 kB [rendered]
chunk {171} 171.js, 171.js.map () 1.36 kB [rendered]
chunk {172} 172.js, 172.js.map () 5.03 kB [rendered]
chunk {common} common.js, common.js.map (common) 20.2 kB [rendered]
chunk {es2015-polyfills} es2015-polyfills.js, es2015-polyfills.js.map (es2015-polyfills) 285 kB [initial] [rendered]
chunk {home-home-module} home-home-module.js, home-home-module.js.map (home-home-module) 31.3 kB [rendered]
chunk {main} main.js, main.js.map (main) 71.7 kB [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 237 kB [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 8.79 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 86.4 kB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 4.14 MB [initial] [rendered]
Removing intermediate container 6f03bb842f8f
---> 57d2a800a20a
Step 7/8 : FROM nginx:alpine
---> 377c0837328f
Step 8/8 : COPY --from=ionic /usr/src/app/www /usr/share/nginx/html
---> 00c19fd63083
Successfully built 00c19fd63083
Successfully tagged ahmedaltour/udacity-frontend:latest
, который успешно генерирует изображение внешнего интерфейса, но проблема заключается в том, что когда я пытаюсь запустить контейнер, используя ---> sudo docker run --publi sh 8100: 8100 --name frontend ahmedaltour / udacity-frontend
после этого ничего не происходит, он не генерирует вывод, и может останавливаться часами.
Вот еще несколько полезных сведений а также об используемой версии ioni c, версии angular и версии узла.
Ionic:
Ionic CLI : 6.3.0 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 4.5.0
@angular-devkit/build-angular : 0.13.9
@angular-devkit/schematics : 7.2.4
@angular/cli : 7.3.9
@ionic/angular-toolkit : 1.4.1
Utility:
cordova-res : not installed
native-run : not installed
System:
NodeJS : v12.16.1 (/usr/local/bin/node)
npm : 6.13.4
OS : Linux 4.15
и этот файл Docker, используемый для создания образа
Dockerfile
## Build
FROM beevelop/ionic AS ionic
# Create app directory
WORKDIR /usr/src/app
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./
RUN npm ci
# Bundle app source
COPY . .
RUN ionic build
## Run
FROM nginx:alpine
#COPY www /usr/share/nginx/html
COPY --from=ionic /usr/src/app/www /usr/share/nginx/html
Ваша помощь очень ценится.
Заранее спасибо.
Ахмед Альтур