Skip to content

Commit

Permalink
add latest certs to the image
Browse files Browse the repository at this point in the history
  • Loading branch information
ameshkov committed Feb 3, 2024
1 parent 5400971 commit 5c407c0
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,22 @@ COPY . .
# name.
RUN VERSION=${VERSION} make build

# Step 2: Use a Docker multi-stage build to create a lean production image.
# Step 2: Use a builder image to get the latest certificates.
FROM alpine:latest as certs

# Download the latest CA certificates
RUN apk --update add ca-certificates

# Step 3: Use a Docker multi-stage build to create a lean production image.
# Start from a scratch (empty) image to keep the image size small.
FROM scratch

# Copy the binary from the builder stage to the production image.
COPY --from=builder /app/udptlspipe /

# Copy the CA certificates from the certs image.
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/

# Exact protocol depends on operation mode: tcp for server and udp for client.
EXPOSE 8443/tcp
EXPOSE 8443/udp
Expand Down

0 comments on commit 5c407c0

Please sign in to comment.