Skip to content

Commit

Permalink
refactor: use container library instead of embedded helpers (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
xoxys authored Apr 11, 2022
1 parent 2ad1bf0 commit 1d85f32
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 29 deletions.
10 changes: 9 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,21 @@ LABEL org.opencontainers.image.url="https://github.com/owncloud-ops/registry"
LABEL org.opencontainers.image.source="https://github.com/owncloud-ops/registry"
LABEL org.opencontainers.image.documentation="https://github.com/owncloud-ops/registry"

ARG CONTAINER_LIBRARY_VERSION

# renovate: datasource=github-releases depName=owncloud-ops/container-library
ENV CONTAINER_LIBRARY_VERSION="${CONTAINER_LIBRARY_VERSION:-v0.1.0}"

ADD overlay/ /
ADD src/bin/registry /bin/registry

RUN addgroup -g 1001 -S app && \
adduser -S -D -H -u 1001 -h /home/app -s /bin/sh -G app -g app app

RUN apk add --no-cache ca-certificates && \
RUN apk --update add --virtual .build-deps curl tar && \
apk add --no-cache ca-certificates && \
curl -SsL "https://github.com/owncloud-ops/container-library/releases/download/${CONTAINER_LIBRARY_VERSION}/container-library.tar.gz" | tar xz -C / && \
apk del .build-deps && \
rm -rf /var/cache/apk/* && \
rm -rf /tmp/*

Expand Down
2 changes: 2 additions & 0 deletions overlay/usr/bin/entrypoint
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#!/usr/bin/env sh

# shellcheck disable=SC3040
set -eo pipefail

# shellcheck disable=SC3046,SC1091
source /usr/local/lib/log.sh

log_info "Start Docker Registry\n"
Expand Down
1 change: 1 addition & 0 deletions overlay/usr/bin/healthcheck
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env sh

# shellcheck disable=SC3040
set -eo pipefail

URL=http://127.0.0.1:5000
Expand Down
28 changes: 0 additions & 28 deletions overlay/usr/local/lib/log.sh

This file was deleted.

0 comments on commit 1d85f32

Please sign in to comment.