Skip to content

Commit

Permalink
helloworld-go: install CA certs
Browse files Browse the repository at this point in the history
All users who are querying any HTTPS endpoints will need this and won't understand why it's failing.
  • Loading branch information
ahmetb committed Apr 4, 2019
1 parent 90cce3f commit 11178de
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion community/samples/serving/helloworld-elixir/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ RUN mix release --env=prod --verbose \
&& mv /opt/release/bin/${APP_NAME} /opt/release/bin/start_server

FROM alpine:latest
RUN apk update && apk --no-cache --update add bash openssl-dev
RUN apk update && apk --no-cache --update add bash openssl-dev ca-certificates

RUN addgroup -g 1000 appuser && \
adduser -S -u 1000 -G appuser appuser
Expand Down
2 changes: 1 addition & 1 deletion community/samples/serving/helloworld-elixir/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ When asked, if you want to `Fetch and install dependencies? [Yn]` select `y`
# Prepare final layer
FROM alpine:latest
RUN apk update && apk --no-cache --update add bash openssl-dev
RUN apk update && apk --no-cache --update add bash openssl-dev ca-certificates
# Add a user so the server will run as a non-root user.
RUN addgroup -g 1000 appuser && \
Expand Down
1 change: 1 addition & 0 deletions docs/install/Knative-with-Gloo.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ RUN CGO_ENABLED=0 GOOS=linux go build -v -o helloworld
# Use a Docker multi-stage build to create a lean production image.
# https://docs.docker.com/develop/develop-images/multistage-build/#use-multi-stage-builds
FROM alpine
RUN apk add --no-cache ca-certificates

# Copy the binary to the production image from the builder stage.
COPY --from=builder /go/src/github.com/knative/docs/helloworld/helloworld /helloworld
Expand Down
1 change: 1 addition & 0 deletions docs/serving/samples/hello-world/helloworld-go/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ RUN CGO_ENABLED=0 GOOS=linux go build -v -o helloworld
# Use a Docker multi-stage build to create a lean production image.
# https://docs.docker.com/develop/develop-images/multistage-build/#use-multi-stage-builds
FROM alpine
RUN apk add --no-cache ca-certificates

# Copy the binary to the production image from the builder stage.
COPY --from=builder /go/src/github.com/knative/docs/helloworld/helloworld /helloworld
Expand Down
1 change: 1 addition & 0 deletions docs/serving/samples/hello-world/helloworld-go/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ recreate the source files from this folder.
# Use a Docker multi-stage build to create a lean production image.
# https://docs.docker.com/develop/develop-images/multistage-build/#use-multi-stage-builds
FROM alpine
RUN apk add --no-cache ca-certificates
# Copy the binary to the production image from the builder stage.
COPY --from=builder /go/src/github.com/knative/docs/helloworld/helloworld /helloworld
Expand Down
1 change: 1 addition & 0 deletions docs/serving/samples/secrets-go/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ RUN CGO_ENABLED=0 GOOS=linux go build -v -o hellosecrets
# Use a Docker multi-stage build to create a lean production image.
# https://docs.docker.com/develop/develop-images/multistage-build/#use-multi-stage-builds
FROM alpine
RUN apk add --no-cache ca-certificates

# Enable the use of outbound https
RUN apk add --no-cache ca-certificates
Expand Down
1 change: 1 addition & 0 deletions docs/serving/samples/secrets-go/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ recreate the source files from this folder.
# Use a Docker multi-stage build to create a lean production image.
# https://docs.docker.com/develop/develop-images/multistage-build/#use-multi-stage-builds
FROM alpine
RUN apk add --no-cache ca-certificates
# Enable the use of outbound https
RUN apk add --no-cache ca-certificates
Expand Down

0 comments on commit 11178de

Please sign in to comment.