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>
(cherry picked from commit 71f08a8)
Signed-off-by: Oliver Gould <ver@buoyant.io>
  • Loading branch information
olix0r committed Mar 30, 2022
1 parent 20eab7d commit 345a547
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 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
8 changes: 0 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,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 345a547

Please sign in to comment.