Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker build 失败 #17

Open
xuxianda opened this issue Apr 25, 2024 · 1 comment
Open

docker build 失败 #17

xuxianda opened this issue Apr 25, 2024 · 1 comment

Comments

@xuxianda
Copy link

[+] Building 6.3s (11/13) docker:default
=> [internal] load build definition from Dockerfile 0.1s
=> => transferring dockerfile: 610B 0.0s
=> [internal] load .dockerignore 0.1s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/node:18.16-alpine 3.2s
=> [internal] load build context 2.8s
=> => transferring context: 187.56MB 2.8s
=> CANCELED [stage-1 1/6] FROM docker.io/library/node:18.16-alpine@sha256:d5b2a7869a4016b1847986ea52098fa404421e44281bb7615a9e3615e07f37fb 2.9s
=> => resolve docker.io/library/node:18.16-alpine@sha256:d5b2a7869a4016b1847986ea52098fa404421e44281bb7615a9e3615e07f37fb 0.0s
=> => sha256:02735cb6c78bf40ddce33f02c68827a8ae3fdc99370db62c77e21c995ace836a 2.34MB / 2.34MB 2.7s
=> => sha256:d5b2a7869a4016b1847986ea52098fa404421e44281bb7615a9e3615e07f37fb 1.43kB / 1.43kB 0.0s
=> => sha256:bf6c61feabc1a1bd565065016abe77fa378500ec75efa67f5b04e5e5c4d447cd 1.16kB / 1.16kB 0.0s
=> => sha256:f85482183a4f18ec843fea14e64575a5550f153211c5b497fea50353cb088645 6.73kB / 6.73kB 0.0s
=> => sha256:31e352740f534f9ad170f75378a84fe453d6156e40700b882d737a8f4a6988a3 3.40MB / 3.40MB 1.3s
=> => sha256:560412e561fb4693d4bc6e5d197ccdfb42d1453d0eebf0d772baeacdbaab4b63 6.29MB / 47.49MB 3.0s
=> => extracting sha256:31e352740f534f9ad170f75378a84fe453d6156e40700b882d737a8f4a6988a3 0.3s
=> => sha256:86d562f7b85533d4f8cf87a09747444f7002c74b1897f5e4db2ffbeafa3013b3 450B / 450B 1.8s
=> CACHED [stage-1 2/6] RUN echo "Asia/Shanghai" > /etc/timezone && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && mkdir -p /data/code/.output 0.0s
=> CACHED [builder 2/4] WORKDIR /app 0.0s
=> CACHED [builder 3/4] COPY . . 0.0s
=> CACHED [builder 4/4] RUN yarn && export VITE_BACKEND_API=http://localhost && yarn build 0.0s
=> CACHED [stage-1 3/6] COPY --from=builder /app/.output /data/code/.output 0.0s
=> ERROR [stage-1 4/6] COPY ./deploy/start.sh /data/code 0.0s

[stage-1 4/6] COPY ./deploy/start.sh /data/code:


Dockerfile:20

18 |
19 | COPY --from=builder /app/.output ${APP_ROOT}/.output
20 | >>> COPY ./deploy/start.sh ${APP_ROOT}
21 |
22 | WORKDIR ${APP_ROOT}

ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref d69c09d6-4cb7-48ec-9c92-33e58a870a7b::synpc2wwb8wzkrwnvyqovjfm9: "/deploy/start.sh": not found

@findthewayxf
Copy link

cd fre123-nav
mkdir deploy
cd deploy
nano start.sh

cd .output/ 
node ./server/index.mjs

cd ..
docker build -t nav -f Dockerfile .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants