Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker Images use golang image for ca-certificates #608

Merged
merged 1 commit into from
Dec 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
# docker build --rm -t woodpeckerci/woodpecker-server .

FROM drone/ca-certs
# use golang image to copy ssl certs later
FROM golang:1.16

FROM scratch

# copy certs from golang:1.16 image
COPY --from=0 /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt

EXPOSE 8000 9000 80 443

ENV GODEBUG=netdns=go
ENV DATABASE_DRIVER=sqlite3
ENV DATABASE_CONFIG=/var/lib/drone/drone.sqlite
ENV GODEBUG=netdns=go
ENV XDG_CACHE_HOME /var/lib/drone

ADD release/drone-server /bin/
Expand Down
9 changes: 8 additions & 1 deletion Dockerfile.agent
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# docker build --rm -f Dockerfile.agent -t woodpeckerci/woodpecker-agent .

FROM drone/ca-certs
# use golang image to copy ssl certs later
FROM golang:1.16

FROM scratch

# copy certs from golang:1.16 image
COPY --from=0 /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt

ENV GODEBUG=netdns=go
ADD release/drone-agent /bin/

Expand Down
3 changes: 1 addition & 2 deletions Dockerfile.agent.alpine
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
FROM alpine:3.9.4

FROM alpine:3.14
RUN apk add -U --no-cache ca-certificates

ENV GODEBUG=netdns=go
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile.alpine
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM alpine:3.9.4
EXPOSE 8000 9000 80 443

FROM alpine:3.14
RUN apk add -U --no-cache ca-certificates

EXPOSE 8000 9000 80 443

ENV GODEBUG=netdns=go
ENV DATABASE_DRIVER=sqlite3
ENV DATABASE_CONFIG=/var/lib/drone/drone.sqlite
ENV GODEBUG=netdns=go
ENV XDG_CACHE_HOME /var/lib/drone

ADD release/drone-server /bin/
Expand Down