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} \
22
22
# Install packages required by the image
23
23
RUN apk add --no-cache --virtual .bin-deps openssl
24
24
25
+ # Copy the entrypoint script
26
+ COPY /app/docker-entrypoint.sh /app/docker-entrypoint.sh
27
+
25
28
# Install docker-gen from build stage
26
29
COPY --from=go-builder /build/docker-gen /usr/local/bin/docker-gen
27
30
28
31
# Copy the license
29
32
COPY LICENSE /usr/local/share/doc/docker-gen/
30
33
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 \
26
26
&& apt-get clean \
27
27
&& rm -r /var/lib/apt/lists/*
28
28
29
+ # Copy the entrypoint script
30
+ COPY /app/docker-entrypoint.sh /app/docker-entrypoint.sh
31
+
29
32
# Install docker-gen from build stage
30
33
COPY --from=go-builder /build/docker-gen /usr/local/bin/docker-gen
31
34
32
35
# Copy the license
33
36
COPY LICENSE /usr/local/share/doc/docker-gen/
34
37
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