Skip to content

Commit

Permalink
Check for bash existence instead of only mentioning it in a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
codablock committed Feb 19, 2020
1 parent b982d6d commit 592cc2d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
@@ -1,4 +1,3 @@
# If you ever upgrade this image, watch out for bash being installed by default in newer alpine base images
FROM nginx:1.17-alpine

RUN apk add bash
Expand Down
@@ -1,6 +1,8 @@
# If you ever upgrade this image, watch out for bash being installed by default in newer alpine base images
FROM nginx:1.17-alpine

# If this fails, you ended up using a base image with bash installed. Consider removing /bin/bash in this case
RUN if bash -c true &> /dev/null; then exit 1; fi

# Make sure the /proc/net/tcp* check fails in this container
RUN rm /usr/bin/awk

Expand Down
@@ -1,6 +1,8 @@
# If you ever upgrade this image, watch out for bash being installed by default in newer alpine base images
FROM nginx:1.17-alpine

# If this fails, you ended up using a base image with bash installed. Consider removing /bin/bash in this case
RUN if bash -c true &> /dev/null; then exit 1; fi

# Make sure the nc check fails in this container
RUN rm /usr/bin/nc

Expand Down

0 comments on commit 592cc2d

Please sign in to comment.