Comments (3)
Same issue when run cmd in powershell.
Following docker desktop leanning center instruction , error occur when build step:
Logs of **docker build -t welcome-to-docker . **
docker build -t welcome-to-docker .
2024/03/01 14:11:12 http2: server: error reading preface from client //./pipe/docker_engine: file has already been closed
[+] Building 3.3s (11/11) FINISHED docker:default
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 669B 0.0s
=> [internal] load metadata for docker.io/library/node:18-alpine 3.0s
=> [auth] library/node:pull token for registry-1.docker.io 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 52B 0.0s
=> [1/6] FROM docker.io/library/node:18-alpine@sha256:ca9f6cb0466f9638e59e0c249d335a07c867cd50c429b5c7830dda1bed584649 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 393B 0.0s
=> CACHED [2/6] WORKDIR /app 0.0s
=> CACHED [3/6] COPY package*.json ./ 0.0s
=> CACHED [4/6] COPY ./src ./src 0.0s
=> CACHED [5/6] COPY ./public ./public 0.0s
=> ERROR [6/6] RUN npm install && npm install -g serve && npm run build && rm -fr node_modules 0.3s
------
> [6/6] RUN npm install && npm install -g serve && npm run build && rm -fr node_modules:
0.253 exec /bin/sh: exec format error
------
Dockerfile:15
--------------------
14 | # Install node packages, install serve, build the app, and remove dependencies at the end
15 | >>> RUN npm install \
16 | >>> && npm install -g serve \
17 | >>> && npm run build \
18 | >>> && rm -fr node_modules
19 |
--------------------
ERROR: failed to solve: process "/bin/sh -c npm install && npm install -g serve && npm run build && rm -fr node_modules" did not complete successfully: exit code: 1
View build details: docker-desktop://dashboard/build/default/default/36fq292mclyizqosxrq2xj1lr
from welcome-to-docker.
I faced the same issue under Windows. Using the same tutorial. Solution: Start cmd as administrator and it would work. If Linux, then Terminal requires sudo docker build -t welcome-to-docker .
and the password for the user.
from welcome-to-docker.
Yeah - I still can't get it running as well...
docker build -t welcome-to-docker .
2024/03/18 15:57:41 http2: server: error reading preface from client //./pipe/docker_engine: file has already been closed
[+] Building 205.0s (10/10) FINISHED docker:default
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 669B 0.0s
=> [internal] load metadata for docker.io/library/node:18-alpine 1.1s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 52B 0.0s
=> [1/6] FROM docker.io/library/node:18-alpine@sha256:c7620fdecfefb96813da62519897808775230386f4c8482e972e37b8b18cb460 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 393B 0.0s
=> CACHED [2/6] WORKDIR /app 0.0s
=> CACHED [3/6] COPY package*.json ./ 0.0s
=> CACHED [4/6] COPY ./src ./src 0.0s
=> CACHED [5/6] COPY ./public ./public 0.0s
=> ERROR [6/6] RUN npm install && npm install -g serve && npm run build && rm -fr node_modules 203.9s
[6/6] RUN npm install && npm install -g serve && npm run build && rm -fr node_modules:
4.687 npm WARN deprecated [email protected]: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
4.708 npm WARN deprecated [email protected]: Please use @jridgewell/sourcemap-codec instead
4.716 npm WARN deprecated [email protected]: Use your platform's native performance.now() and performance.timeOrigin.
5.333 npm WARN deprecated [email protected]: This SVGO version is no longer supported. Upgrade to v2.x.x.
34.92 npm WARN deprecated [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-terser
203.8 npm notice
203.8 npm notice New minor version of npm available! 10.2.4 -> 10.5.0
203.8 npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.5.0
203.8 npm notice Runnpm install -g [email protected]
to update!
203.8 npm notice
203.8 npm ERR! code ECONNRESET
203.8 npm ERR! errno ECONNRESET
203.8 npm ERR! network request to https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz failed, reason: Client network socket disconnected before secure TLS connection was established
203.8 npm ERR! network This is a problem related to network connectivity.
203.8 npm ERR! network In most cases you are behind a proxy or have bad network settings.
203.8 npm ERR! network
203.8 npm ERR! network If you are behind a proxy, please make sure that the
203.8 npm ERR! network 'proxy' config is set properly. See: 'npm help config'
203.8
203.8 npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-03-18T22_57_43_298Z-debug-0.log
Dockerfile:15
14 | # Install node packages, install serve, build the app, and remove dependencies at the end
15 | >>> RUN npm install
16 | >>> && npm install -g serve
17 | >>> && npm run build
18 | >>> && rm -fr node_modules
19 |
ERROR: failed to solve: process "/bin/sh -c npm install && npm install -g serve && npm run build && rm -fr node_modules" did not complete successfully: exit code: 1
from welcome-to-docker.
Related Issues (4)
- Is contributions accepted for this repo? HOT 3
- Command not working on Windows HOT 1
- ej HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from welcome-to-docker.