Skip to content

Commit

Permalink
fix(docker): use alpine and add openssh-client (#1502)
Browse files Browse the repository at this point in the history
Signed-off-by: Patrik Cyvoct <[email protected]>

Co-authored-by: Rémy Léone <[email protected]>
  • Loading branch information
Sh4d1 and remyleone authored Oct 27, 2020
1 parent b67adbb commit feafe6a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM golang:1.14-alpine as builder
FROM golang:1.15-alpine as builder

ENV BUILD_IN_DOCKER true

# ca-certificates is needed to add the certificates on the next image
# since it's FROM scratch, it does not have any certificates
# bash is needed to run the build script
RUN apk update && apk add --no-cache bash git ca-certificates && update-ca-certificates
RUN apk update && apk add --no-cache bash git

WORKDIR /go/src/github.com/scaleway/scaleway-cli

Expand All @@ -20,8 +20,8 @@ COPY .git/ .git/

RUN ./scripts/build.sh

FROM scratch
FROM alpine:3.12
WORKDIR /
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
RUN apk update && apk add --no-cache bash ca-certificates openssh-client && update-ca-certificates
COPY --from=builder /go/src/github.com/scaleway/scaleway-cli/scw .
ENTRYPOINT ["/scw"]

0 comments on commit feafe6a

Please sign in to comment.