Skip to content

Commit

Permalink
Fix dockerfile (#1500)
Browse files Browse the repository at this point in the history
PR #1479 changed the docker base image to not include a shell, which
broke the dockerfile's logic for skipping the identity wrapper. It's no
longer possible to run the proxy without identity, so this functionality
isn't needed in any case.

This change fixes the Dockerfile and adds a CI workflow to test docker
builds on Dockerfile changes.

Signed-off-by: Oliver Gould <ver@buoyant.io>
  • Loading branch information
olix0r committed Feb 15, 2022
1 parent 87adcda commit 71f08a8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: docker

on:
pull_request:
paths:
- Dockerfile

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 20
env:
DOCKER_BUILDKIT: "1"
steps:
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
- run: docker build . --build-arg PROXY_UNOPTIMIZED=1
9 changes: 0 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,7 @@ RUN --mount=type=cache,target=target \
## Install the proxy binary into the base runtime image.
FROM $RUNTIME_IMAGE as runtime

# When set, causes the proxy to remove the identity wrapper responsible for
# CSR and key generation.
ARG SKIP_IDENTITY_WRAPPER

WORKDIR /linkerd
COPY --from=build /out/linkerd2-proxy /usr/lib/linkerd/linkerd2-proxy
ENV LINKERD2_PROXY_LOG=warn,linkerd=info
RUN \
if [ -n "$SKIP_IDENTITY_WRAPPER" ] ; then \
rm -f /usr/bin/linkerd2-proxy-run && \
ln /usr/lib/linkerd/linkerd2-proxy /usr/bin/linkerd2-proxy-run ; \
fi
# Inherits the ENTRYPOINT from the runtime image.

0 comments on commit 71f08a8

Please sign in to comment.