Skip to content

Commit fcdf38f

Browse files
authored
docker: Ship certificates to the container (#126)
scratch is an empty container without any certs, this will make sidekick fails to connect with MinIO with TLS configured. This commit will copy the standard certs from the latest alpine image to get the latest standard certificates.
1 parent 7e5ad83 commit fcdf38f

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

.github/workflows/go.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ jobs:
3030
env:
3131
GO111MODULE: on
3232
run: |
33-
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin
33+
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b $(go env GOPATH)/bin
3434
$(go env GOPATH)/bin/golangci-lint run --timeout=5m --config ./.golangci.yml
3535
go test -v -race ./...

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.18
1+
FROM golang:1.24
22

33
ADD go.mod /go/src/github.com/minio/sidekick/go.mod
44
ADD go.sum /go/src/github.com/minio/sidekick/go.sum
@@ -18,5 +18,7 @@ MAINTAINER MinIO Development "[email protected]"
1818
EXPOSE 8080
1919

2020
COPY --from=0 /go/src/github.com/minio/sidekick/sidekick /sidekick
21+
COPY --from=0 /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
22+
2123

2224
ENTRYPOINT ["/sidekick"]

Dockerfile.release

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1+
FROM alpine:latest as certs
2+
RUN apk --update add ca-certificates
3+
14
FROM scratch
25
MAINTAINER MinIO Development "[email protected]"
36
EXPOSE 8080
4-
COPY sidekick /sidekick
5-
ENTRYPOINT ["/sidekick"]
7+
8+
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
9+
COPY sidekick /bin/sidekick
10+
11+
ENTRYPOINT ["/bin/sidekick"]

0 commit comments

Comments
 (0)