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

[release/2.6] Update alpine to 3.8 for arm support #83

Merged
merged 1 commit into from
Dec 28, 2018

Conversation

dmcgowan
Copy link
Contributor

@dmcgowan dmcgowan commented Dec 4, 2018

Tested change on amd64 and arm64 machine and works on both. I don't have access to test the arm version if someone wants to try it out.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
@dmcgowan dmcgowan changed the title Update alpine to 3.8 for arm support [release/2.6] Update alpine to 3.8 for arm support Dec 4, 2018
@yosifkit
Copy link

yosifkit commented Dec 5, 2018

I'm still confused why the binaries are still committed to this repo and not just artifacts with signatures as part of the releases on https://github.com/docker/distribution or even just use something like #74 (which automatically had support for more architectures: amd64, arm32v6, arm64v8, i386, ppc64le, s390x).


Tested the arm32v6 build on a Raspberry Pi and it worked fine.

ubuntu@ubuntu:~/distribution-library-image$ docker build ./arm/
Sending build context to Docker daemon  20.09MB
Step 1/9 : FROM alpine:3.8
 ---> 8e425eb51aaf
Step 2/9 : RUN set -ex     && apk add --no-cache ca-certificates apache2-utils
 ---> Running in d1a520cb6b8d
+ apk add --no-cache ca-certificates apache2-utils
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/main/armhf/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/community/armhf/APKINDEX.tar.gz
(1/7) Installing libuuid (2.32-r0)
(2/7) Installing apr (1.6.3-r1)
(3/7) Installing libgcc (6.4.0-r9)
(4/7) Installing expat (2.2.5-r0)
(5/7) Installing apr-util (1.6.1-r2)
(6/7) Installing apache2-utils (2.4.35-r0)
(7/7) Installing ca-certificates (20171114-r3)
Executing busybox-1.28.4-r1.trigger
Executing ca-certificates-20171114-r3.trigger
OK: 5 MiB in 20 packages
 ---> 6adece522d42
Removing intermediate container d1a520cb6b8d
Step 3/9 : COPY ./registry /bin/registry
 ---> 9c862a83679e
Removing intermediate container 303db2b6d6f7
Step 4/9 : COPY ./config-example.yml /etc/docker/registry/config.yml
 ---> 0283b4d3a16a
Removing intermediate container 9dcb2bfabe7d
Step 5/9 : VOLUME /var/lib/registry
 ---> Running in f5ded11d3ea0
 ---> b9f7d3e34813
Removing intermediate container f5ded11d3ea0
Step 6/9 : EXPOSE 5000
 ---> Running in 7349b7173549
 ---> 68912ec0c1f5
Removing intermediate container 7349b7173549
Step 7/9 : COPY docker-entrypoint.sh /entrypoint.sh
 ---> 01ef819f4c84
Removing intermediate container a913f7df9583
Step 8/9 : ENTRYPOINT /entrypoint.sh
 ---> Running in 14621664faf3
 ---> 1b1a9b5d7c61
Removing intermediate container 14621664faf3
Step 9/9 : CMD /etc/docker/registry/config.yml
 ---> Running in aa45e31d389c
 ---> 261f84734c55
Removing intermediate container aa45e31d389c
Successfully built 261f84734c55
ubuntu@ubuntu:~/distribution-library-image$ docker run -it --rm 261f84734c55
WARN[0000] No HTTP secret provided - generated random secret. This may cause problems with uploads if multiple registries are behind a load-balancer. To provide a shared secret, fill in http.secret in the configuration file or set the REGISTRY_HTTP_SECRET environment variable.  go.version=go1.7.6 instance.id=aeb0a469-7e14-4382-a8c2-09216027c741 version=v2.6.2-16-g45983af
INFO[0000] redis not configured                          go.version=go1.7.6 instance.id=aeb0a469-7e14-4382-a8c2-09216027c741 version=v2.6.2-16-g45983af
INFO[0000] Starting upload purge in 45m0s                go.version=go1.7.6 instance.id=aeb0a469-7e14-4382-a8c2-09216027c741 version=v2.6.2-16-g45983af
INFO[0000] using inmemory blob descriptor cache          go.version=go1.7.6 instance.id=aeb0a469-7e14-4382-a8c2-09216027c741 version=v2.6.2-16-g45983af
INFO[0000] listening on [::]:5000                        go.version=go1.7.6 instance.id=aeb0a469-7e14-4382-a8c2-09216027c741 version=v2.6.2-16-g45983af

@dmcgowan
Copy link
Contributor Author

dmcgowan commented Dec 5, 2018

@yosifkit the Dockerfile in the distribution repository has the go version the registry is tested and released with. We don't support newer version of Go for past releases unless there is a point release which adds support. Since there is currently no support for multi-stage building we see the most supportable alternative as building the the equivalent of the first stage and checking in the artifacts so official image can be built as the equivalent of the last stage. Once the official images add support for multi stage build (or buildkit would be even better), we hope to see this method change and maybe this whole repository as redundant.

@yosifkit
Copy link

Current approach seems acceptable to me. It could be improved if the binaries were part of the github releases of docker/distribution with gpg signatures, but this will work.

@lag-linaro
Copy link

LGTM

@lag-linaro
Copy link

What's the difference between this and #84 ?

@yosifkit
Copy link

yosifkit commented Dec 17, 2018

@lag-linaro, the difference is the target branch; this one is targeting release/2.6 while #84 is targeting master.

Edit: I believe both need to be merged and then the commit id's put in the right spots for docker-library/official-images#5141 (possibly even updating the registry-v2.7.0 branch here too)

@lag-linaro
Copy link

Understood. Thank you for the explanation.

@caervs caervs merged commit fc40f1f into release/2.6 Dec 28, 2018
@dmcgowan dmcgowan deleted the 2.6-update-alpine branch January 17, 2019 23:29
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

Successfully merging this pull request may close these issues.

4 participants