Support arm and arm64 binaries for v2.6.2
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
This commit is contained in:
parent
15dbd1a011
commit
eb58390c83
|
@ -0,0 +1,17 @@
|
|||
# Build a minimal distribution container
|
||||
|
||||
FROM alpine:3.4
|
||||
|
||||
RUN set -ex \
|
||||
&& apk add --no-cache ca-certificates apache2-utils
|
||||
|
||||
COPY ./registry /bin/registry
|
||||
COPY ./config-example.yml /etc/docker/registry/config.yml
|
||||
|
||||
VOLUME ["/var/lib/registry"]
|
||||
EXPOSE 5000
|
||||
|
||||
COPY docker-entrypoint.sh /entrypoint.sh
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
||||
CMD ["/etc/docker/registry/config.yml"]
|
|
@ -5,8 +5,8 @@ FROM alpine:3.4
|
|||
RUN set -ex \
|
||||
&& apk add --no-cache ca-certificates apache2-utils
|
||||
|
||||
COPY ./registry/registry /bin/registry
|
||||
COPY ./registry/config-example.yml /etc/docker/registry/config.yml
|
||||
COPY ./registry /bin/registry
|
||||
COPY ./config-example.yml /etc/docker/registry/config.yml
|
||||
|
||||
VOLUME ["/var/lib/registry"]
|
||||
EXPOSE 5000
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
case "$1" in
|
||||
*.yaml|*.yml) set -- registry serve "$@" ;;
|
||||
serve|garbage-collect|help|-*) set -- registry "$@" ;;
|
||||
esac
|
||||
|
||||
exec "$@"
|
Binary file not shown.
|
@ -0,0 +1,17 @@
|
|||
# Build a minimal distribution container
|
||||
|
||||
FROM alpine:3.4
|
||||
|
||||
RUN set -ex \
|
||||
&& apk add --no-cache ca-certificates apache2-utils
|
||||
|
||||
COPY ./registry /bin/registry
|
||||
COPY ./config-example.yml /etc/docker/registry/config.yml
|
||||
|
||||
VOLUME ["/var/lib/registry"]
|
||||
EXPOSE 5000
|
||||
|
||||
COPY docker-entrypoint.sh /entrypoint.sh
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
||||
CMD ["/etc/docker/registry/config.yml"]
|
|
@ -0,0 +1,18 @@
|
|||
version: 0.1
|
||||
log:
|
||||
fields:
|
||||
service: registry
|
||||
storage:
|
||||
cache:
|
||||
blobdescriptor: inmemory
|
||||
filesystem:
|
||||
rootdirectory: /var/lib/registry
|
||||
http:
|
||||
addr: :5000
|
||||
headers:
|
||||
X-Content-Type-Options: [nosniff]
|
||||
health:
|
||||
storagedriver:
|
||||
enabled: true
|
||||
interval: 10s
|
||||
threshold: 3
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
case "$1" in
|
||||
*.yaml|*.yml) set -- registry serve "$@" ;;
|
||||
serve|garbage-collect|help|-*) set -- registry "$@" ;;
|
||||
esac
|
||||
|
||||
exec "$@"
|
Binary file not shown.
|
@ -0,0 +1,17 @@
|
|||
# Build a minimal distribution container
|
||||
|
||||
FROM alpine:3.4
|
||||
|
||||
RUN set -ex \
|
||||
&& apk add --no-cache ca-certificates apache2-utils
|
||||
|
||||
COPY ./registry /bin/registry
|
||||
COPY ./config-example.yml /etc/docker/registry/config.yml
|
||||
|
||||
VOLUME ["/var/lib/registry"]
|
||||
EXPOSE 5000
|
||||
|
||||
COPY docker-entrypoint.sh /entrypoint.sh
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
||||
CMD ["/etc/docker/registry/config.yml"]
|
|
@ -0,0 +1,18 @@
|
|||
version: 0.1
|
||||
log:
|
||||
fields:
|
||||
service: registry
|
||||
storage:
|
||||
cache:
|
||||
blobdescriptor: inmemory
|
||||
filesystem:
|
||||
rootdirectory: /var/lib/registry
|
||||
http:
|
||||
addr: :5000
|
||||
headers:
|
||||
X-Content-Type-Options: [nosniff]
|
||||
health:
|
||||
storagedriver:
|
||||
enabled: true
|
||||
interval: 10s
|
||||
threshold: 3
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
case "$1" in
|
||||
*.yaml|*.yml) set -- registry serve "$@" ;;
|
||||
serve|garbage-collect|help|-*) set -- registry "$@" ;;
|
||||
esac
|
||||
|
||||
exec "$@"
|
Binary file not shown.
|
@ -0,0 +1,18 @@
|
|||
version: 0.1
|
||||
log:
|
||||
fields:
|
||||
service: registry
|
||||
storage:
|
||||
cache:
|
||||
blobdescriptor: inmemory
|
||||
filesystem:
|
||||
rootdirectory: /var/lib/registry
|
||||
http:
|
||||
addr: :5000
|
||||
headers:
|
||||
X-Content-Type-Options: [nosniff]
|
||||
health:
|
||||
storagedriver:
|
||||
enabled: true
|
||||
interval: 10s
|
||||
threshold: 3
|
20
update.sh
20
update.sh
|
@ -9,26 +9,34 @@ fi
|
|||
|
||||
VERSION=$1
|
||||
|
||||
if [ "$GOARCH" == "" ] ; then
|
||||
echo "Must set GOARCH in environment"
|
||||
exit
|
||||
fi
|
||||
|
||||
# cd to the current directory so the script can be run from anywhere.
|
||||
cd `dirname $0`
|
||||
|
||||
echo "Fetching and building distribution $VERSION..."
|
||||
|
||||
# Create a temporary directory.
|
||||
TEMP=`mktemp -d /$TMPDIR/distribution.XXXXXX`
|
||||
TEMP=`mktemp -d --tmpdir distribution.XXXXXX`
|
||||
|
||||
git clone -b $VERSION https://github.com/docker/distribution.git $TEMP
|
||||
docker build -t distribution-builder $TEMP
|
||||
docker build --build-arg GOARCH=$GOARCH --build-arg GOARM=$GOARM -t distribution-builder-$GOARCH $TEMP
|
||||
|
||||
# Create a dummy distribution-build container so we can run a cp against it.
|
||||
ID=$(docker create distribution-builder)
|
||||
ID=$(docker create distribution-builder-$GOARCH)
|
||||
|
||||
# Update the local binary and config.
|
||||
docker cp $ID:/go/bin/registry registry
|
||||
docker cp $ID:/go/src/github.com/docker/distribution/cmd/registry/config-example.yml registry
|
||||
docker cp $ID:/go/bin/registry $GOARCH
|
||||
docker cp $ID:/go/src/github.com/docker/distribution/cmd/registry/config-example.yml $GOARCH
|
||||
|
||||
# Cleanup.
|
||||
docker rm -f $ID
|
||||
docker rmi distribution-builder
|
||||
docker rmi distribution-builder-$GOARCH
|
||||
|
||||
cp Dockerfile.noarch $GOARCH/Dockerfile
|
||||
cp docker-entrypoint.sh config-example.yml $GOARCH
|
||||
|
||||
echo "Done."
|
||||
|
|
Loading…
Reference in New Issue