File tree Expand file tree Collapse file tree 3 files changed +16
-2
lines changed
Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -22,10 +22,13 @@ ENV DOCKER_GEN_VERSION=${DOCKER_GEN_VERSION} \
2222# Install packages required by the image
2323RUN apk add --no-cache --virtual .bin-deps openssl
2424
25+ # Copy the entrypoint script
26+ COPY /app/docker-entrypoint.sh /app/docker-entrypoint.sh
27+
2528# Install docker-gen from build stage
2629COPY --from=go-builder /build/docker-gen /usr/local/bin/docker-gen
2730
2831# Copy the license
2932COPY LICENSE /usr/local/share/doc/docker-gen/
3033
31- ENTRYPOINT ["/usr/local/bin/ docker-gen "]
34+ ENTRYPOINT ["/app/ docker-entrypoint.sh "]
Original file line number Diff line number Diff line change @@ -26,10 +26,13 @@ RUN apt-get update \
2626 && apt-get clean \
2727 && rm -r /var/lib/apt/lists/*
2828
29+ # Copy the entrypoint script
30+ COPY /app/docker-entrypoint.sh /app/docker-entrypoint.sh
31+
2932# Install docker-gen from build stage
3033COPY --from=go-builder /build/docker-gen /usr/local/bin/docker-gen
3134
3235# Copy the license
3336COPY LICENSE /usr/local/share/doc/docker-gen/
3437
35- ENTRYPOINT ["/usr/local/bin/ docker-gen "]
38+ ENTRYPOINT ["/app/ docker-entrypoint.sh "]
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ set -eu
4+
5+ # run container's CMD if it is an executable in PATH
6+ command -v -- " $1 " > /dev/null 2>&1 || set -- docker-gen " $@ "
7+
8+ exec " $@ "
You can’t perform that action at this time.
0 commit comments