Comments (14)
Replication:
Given Dockerfile:
FROM alpine/git:latest
RUN apk add --no-cache patch
Run: docker buildx build --platform linux/arm64 -t my/test:1234 --pull -f Dockerfile --progress plain .
Output:
#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 115B done
#1 DONE 0.0s
#2 [internal] load .dockerignore
#2 transferring context: 2B done
#2 DONE 0.0s
#3 [internal] load metadata for docker.io/alpine/git:latest
#3 ...
#4 [auth] alpine/git:pull token for registry-1.docker.io
#4 DONE 0.0s
#3 [internal] load metadata for docker.io/alpine/git:latest
#3 DONE 1.4s
#5 [1/2] FROM docker.io/alpine/git:latest@sha256:21461e49220465a1506e10e66468a74ebe6dac6d5979fbec0486c147834f289d
#5 CACHED
#6 [2/2] RUN apk add --no-cache patch
#6 0.277 fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/main/aarch64/APKINDEX.tar.gz
#6 1.420 fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/community/aarch64/APKINDEX.tar.gz
#6 2.906 (1/1) Installing patch (2.7.6-r7)
#6 2.989 Executing busybox-1.35.0-r17.trigger
#6 3.042 1 error; 40 MiB in 43 packages
#6 ERROR: executor failed running [/bin/sh -c apk add --no-cache patch]: exit code: 1
------
> [2/2] RUN apk add --no-cache patch:
#6 0.277 fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/main/aarch64/APKINDEX.tar.gz
#6 1.420 fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/community/aarch64/APKINDEX.tar.gz
#6 2.906 (1/1) Installing patch (2.7.6-r7)
#6 2.989 Executing busybox-1.35.0-r17.trigger
#6 3.042 1 error; 40 MiB in 43 packages
------
error: failed to solve: executor failed running [/bin/sh -c apk add --no-cache patch]: exit code: 1
Given Dockerfile:
FROM alpine/git:v2.36.2
RUN apk add --no-cache patch
Run: docker buildx build --platform linux/arm64 -t my/test:1234 --pull -f Dockerfile --progress plain .
Output:
#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 115B done
#1 DONE 0.0s
#2 [internal] load .dockerignore
#2 transferring context: 2B done
#2 DONE 0.0s
#3 [internal] load metadata for docker.io/alpine/git:v2.36.2
#3 DONE 0.8s
#4 [1/2] FROM docker.io/alpine/git:v2.36.2@sha256:6ab97e71d0237173aaaf4bab81392a39ff0a858f5b2f80b6b1dcc70688b122f4
#4 DONE 0.0s
#5 [2/2] RUN apk add --no-cache patch
#5 CACHED
#6 exporting to image
#6 exporting layers done
#6 writing image sha256:834667a215c92df537669719a390e36488c211ec4d42e9bfdf0ac3b525daaa12 done
#6 naming to docker.io/my/test:1234 done
#6 DONE 0.0s
from git.
Using your Dockerfile as Dockerfile-alpine-git
, I rebuilt the alpine/git image locally for test purposes:
docker buildx build --no-cache --platform linux/arm64 -t alpine/git:mff --pull -f Dockerfile-alpine-git --progress plain .
Then used it in the same test as above (with FROM alpine/git:mff
instead):
docker buildx build --no-cache --platform linux/arm64 -t my/test:1234 -f Dockerfile --progress plain .
and it worked fine.
Note that this made use of the following as the current baseline alpine image:
docker.io/library/alpine@sha256:bc41182d7ef5ffc53a40b044e725193bc10142a1243f395ee852a8d9730fc2ad
Which corresponds to
alpine 3.16.2 sha256:bc41182d7ef5ffc53a40b044e725193bc10142a1243f395ee852a8d9730fc2ad 9c6f07244728
from git.
Thanks for reporting this issue.
In fact, I have no suitable environments to test the image health other than amd64
most recent PR is this: #48, but seems it is fine.
Normally it runs automatically by schedule job from pipeline, this time, I can force a rebuild if you want to have a try.
from git.
May related to the build design.
At that time, I didn't know the tool crane The build.sh
can't build a multi-arch image and push with different tags.
So I have to run docker buildx
two times, one for tag latest
, the other to use git version as tag
${DOCKER_PUSH} -t ${image}:latest .
${DOCKER_PUSH} -t ${image}:v${VERSION} .
So they are not exact same.
Now I proved crane
is the right tool, so I will raise a PR for the improvement, then you can test it.
from git.
Copy and paste the test result, I use the tool crane
to copy the image from remote and push to my own account, it works
$ crane copy alpine/git ozbillwang/git-test
2022/08/30 16:09:13 Copying from alpine/git to ozbillwang/git-test
2022/08/30 16:09:18 mounted blob: sha256:e40794ee42013856ad485b7f6685605e5469171c09c8ea3e9d46fcd4cb670187
2022/08/30 16:09:19 mounted blob: sha256:0d29e9bc61a21fefc2d4795f4a0ec79bb97d5f6ea041429b8d3ca3d00751d848
2022/08/30 16:09:19 mounted blob: sha256:df6434eeda49cf9829dd6f812e2fe7295c3e900325c3d75e6671da18a5b8b7a8
2022/08/30 16:09:19 mounted blob: sha256:213ec9aee27d8be045c6a92b7eac22c9a64b44558193775a1a7f626352392b49
2022/08/30 16:09:19 index.docker.io/ozbillwang/git-test@sha256:c146fa0eb46124730c078cbf34194675e54998d2293a969e2e0f689bd72751ab: digest: sha256:c146fa0eb46124730c078cbf34194675e54998d2293a969e2e0f689bd72751ab size: 946
2022/08/30 16:09:21 mounted blob: sha256:8ee3f2c67027c17058c7361cbce8876947358bb0f5663c3c07dae610ec0dd99c
2022/08/30 16:09:21 mounted blob: sha256:c6556b3b6858c6fa1e328377cc2c4becdc9cd1bc3e7302aa7299936522cf93ba
2022/08/30 16:09:21 mounted blob: sha256:da5c0f8dd7a4395cff4d45f85082f69c08f2cb33d84326b6a5386ce103246850
2022/08/30 16:09:22 mounted blob: sha256:5307bef720320b6d4922bfa1d457f0013fdc878ad6043c79acfe65d66b4a9e87
2022/08/30 16:09:22 index.docker.io/ozbillwang/git-test@sha256:6bad99ff32ad6cd11e2afe0fa8271f0da6efc06ccdf59ba7040b3d07cbfe8d70: digest: sha256:6bad99ff32ad6cd11e2afe0fa8271f0da6efc06ccdf59ba7040b3d07cbfe8d70 size: 946
2022/08/30 16:09:24 existing blob: sha256:8ee3f2c67027c17058c7361cbce8876947358bb0f5663c3c07dae610ec0dd99c
2022/08/30 16:09:24 mounted blob: sha256:9b18e9b68314027565b90ff6189d65942c0f7986da80df008b8431276885218e
2022/08/30 16:09:24 mounted blob: sha256:54aed2cc5c9614c952b13354909192438650c84d7a90c54b5d266b06a0d00426
2022/08/30 16:09:24 mounted blob: sha256:703b41cc67613d33997f421a45748bbeed3998d4aa3fc6f0e2b79e8dfed90f7e
2022/08/30 16:09:25 index.docker.io/ozbillwang/git-test@sha256:9c677d2b188207ab09c9e19b34ecfa6edef7c14200020ddbfbe834383982082a: digest: sha256:9c677d2b188207ab09c9e19b34ecfa6edef7c14200020ddbfbe834383982082a size: 946
2022/08/30 16:09:27 mounted blob: sha256:9506b835437abb4d8ba1683e00c500b8f77e1975e930b356fbb72f2dbdc274d9
2022/08/30 16:09:27 mounted blob: sha256:27d4c855042f35d3e93f7e08aa667c4685d0dfd3a435d3c367c949e285ce2e39
2022/08/30 16:09:27 mounted blob: sha256:4c43d79504debdb752629243cac906d6d96fe742f85303f1f35aeb1ca4ca8609
2022/08/30 16:09:27 mounted blob: sha256:b97885920798847850729e8ea24bc5957654e08699c3edfa0d81db1d70a4e49d
2022/08/30 16:09:27 index.docker.io/ozbillwang/git-test@sha256:d0de3931171fd634071a9dcb63f66b76589888bb2279d6df2329e2280c133254: digest: sha256:d0de3931171fd634071a9dcb63f66b76589888bb2279d6df2329e2280c133254 size: 946
2022/08/30 16:09:29 mounted blob: sha256:dbc1c2bcf40b36692e3c99f3a46af523a700a9a13615df9911967e72d78ef98f
2022/08/30 16:09:29 mounted blob: sha256:21f0b747dbf2e635ba855a00cfcca485ee659f261055ba4324fcb394ca10c979
2022/08/30 16:09:29 mounted blob: sha256:c79e5d1a8c89b87020a754c8a5c8370faaa37bfb5bca1d8af66770d522ef1caf
2022/08/30 16:09:29 mounted blob: sha256:f395786555d972a0853e08797019f18dc43e01d6c7a66d475f8457b0101f293b
2022/08/30 16:09:30 index.docker.io/ozbillwang/git-test@sha256:4f8161cbd0b9ea77b8544f80b3cb19fdbc424c59fa0dfcb2ce2159432a0f308d: digest: sha256:4f8161cbd0b9ea77b8544f80b3cb19fdbc424c59fa0dfcb2ce2159432a0f308d size: 946
2022/08/30 16:09:32 existing blob: sha256:dbc1c2bcf40b36692e3c99f3a46af523a700a9a13615df9911967e72d78ef98f
2022/08/30 16:09:32 mounted blob: sha256:790c84f1f3409eab952345157df7fa804ba6b5f06d4ceb6f2dfa3c6de2064397
2022/08/30 16:09:32 mounted blob: sha256:6158a1310b80137d445f8b2f50f82438395cd4269012d8eef724bf5009994fe8
2022/08/30 16:09:32 mounted blob: sha256:84db72e0d8351dc9eeffa8a6a15251770a5677332d6f1e37555ba5bba797a3d4
2022/08/30 16:09:32 index.docker.io/ozbillwang/git-test@sha256:b6198a1981466dd218d7585594b1117adbb6b3599c9bb34429c8a118bc14f288: digest: sha256:b6198a1981466dd218d7585594b1117adbb6b3599c9bb34429c8a118bc14f288 size: 946
2022/08/30 16:09:33 ozbillwang/git-test: digest: sha256:21461e49220465a1506e10e66468a74ebe6dac6d5979fbec0486c147834f289d size: 2029
I did the same to alpine/git:v2.36.2
can you also confirm if the destination images are same and functioned after copy
from git.
PR has been merged, and new image built.
Please confirm
from git.
@ozbillwang So the same problem has reappeared on the same tags - for some reason it seems you rebuilt 2.36.2 again the other day, breaking it, rather than creating a new tag like 2.36.3 to ensure the original it at least stable. Can you look into this problem?
Note that it's exactly the same situation as before, where patch
is once again not installable on arm64.
from git.
let me check.
Reason is, there was a requirement for Vulnerability fix ( #52 ) , I triggered the pipeline manually and build the image again.
Because tag is the git version, so tag 2.36.2 is updated in this case.
from git.
One problem found, the digest of images are different
2.63.2: DIGEST:sha256:301e60008fae7cbaaf7e6d4c859315df13f14d2bf9bb78cdda04bd48a31265b2
latest: DIGEST:sha256:301e60008fae7cbaaf7e6d4c859315df13f14d2bf9bb78cdda04bd48a31265b2
v2.36.2: DIGEST:sha256:f5e5d4a6c91b26b8066c61d6ab060693cfb5c472a5aaf793e21267ff0115ec2d
But all layers are exact same
in code, v2.36.2 is built locally, 2.36.2
and latest
are copied by crone
${DOCKER_PUSH} -t ${image}:v${VERSION} .
./crane copy ${image}:v${VERSION} ${image}:latest
./crane copy ${image}:v${VERSION} ${image}:${VERSION}
Second, I will add patch
in Dockerfile, seems it is useful for git
from git.
report the bug to crane (google/go-containerregistry#1460)
from git.
I have added the package patch
in Dockerfile directly and trigger the build in pipeline, the builds are fine, and pushed.
https://app.travis-ci.com/github/alpine-docker/git/builds/256415802
could you check and confirm from your end.
from git.
I will test this out today - will patch
be included in all builds going forward then?
from git.
Also, this appears to work - I was able to remove the step that installs patch
and just use the one you've added.
from git.
yes, I have integrated the package patch
into this image, patch
looks useful with git coding.
from git.
Related Issues (20)
- current alpine release HOT 2
- apk has errors when run on arm64 HOT 12
- Any good example how to add .ssh key from environment variable? HOT 2
- Host key verification failed when trying to clone in kubernetes HOT 2
- Can not clone repository HOT 2
- Update git() function HOT 1
- what the heck is the latest tag? Git v1 or git v2? HOT 1
- Alpine docker does not support git 2.35.2 HOT 8
- Add riscv64 support HOT 7
- Vulnerability in libexpat < 2.4.9 CVE-2022-40674 HOT 2
- fatal: detected dubious ownership in repository at '/git' HOT 3
- sed, cmd_, uname not found while trying to run git-sh-setup for GitSubmodules. HOT 4
- Docker is sunsetting Free Team organizations HOT 4
- Monthly builds are not running HOT 9
- curl does not work on latest HOT 5
- How can i upgrade the git version in alpine/git:v2.24.3-user ? HOT 1
- Re-enable non-root image builds HOT 3
- Git pull_request - perl missing in image
- Can't connect to any url 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 git.