Skip to content

Commit

Permalink
Fixed initial certs + Made dockerbuild faster when go-code changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Albert committed Oct 28, 2018
1 parent 2c4f89e commit ff180fd
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang as gobuilder
FROM golang:alpine as gobuilder
ADD . /go
RUN go build -o configurator

Expand All @@ -14,7 +14,6 @@ RUN mkdir -p /opt/certbot-slim \
&& rm -r /opt/certbot-slim/acme/examples \
&& rm -r /opt/certbot-slim/certbot/tests
FROM python:2-alpine3.7
COPY --from=gobuilder /go/configurator /go/template.https.conf /go/template.stream.conf /go/template.cert.sh /var/lib/configurator/
COPY --from=certbot /opt/certbot-slim /opt/certbot/src/
# Certbots filtered Dockerfile

Expand Down Expand Up @@ -179,6 +178,7 @@ STOPSIGNAL SIGTERM

# End of Nginx's Dockerfile
ADD nginx.conf global.conf /etc/nginx/
COPY --from=gobuilder /go/configurator /go/template.https.conf /go/template.stream.conf /go/template.cert.sh /var/lib/configurator/
RUN mkdir /webroot \
&& mkdir /backends \
&& mkdir /etc/nginx/stream-conf.d \
Expand Down
1 change: 0 additions & 1 deletion Dockerfile.middle
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
COPY --from=gobuilder /go/configurator /go/template.https.conf /go/template.stream.conf /go/template.cert.sh /var/lib/configurator/
COPY --from=certbot /opt/certbot-slim /opt/certbot/src/
2 changes: 1 addition & 1 deletion Dockerfile.prefix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang as gobuilder
FROM golang:alpine as gobuilder
ADD . /go
RUN go build -o configurator

Expand Down
1 change: 1 addition & 0 deletions Dockerfile.suffix
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
ADD nginx.conf global.conf /etc/nginx/
COPY --from=gobuilder /go/configurator /go/template.https.conf /go/template.stream.conf /go/template.cert.sh /var/lib/configurator/
RUN mkdir /webroot \
&& mkdir /backends \
&& mkdir /etc/nginx/stream-conf.d \
Expand Down
2 changes: 1 addition & 1 deletion configurator.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func waitForHttpPort() error {
if tries--; tries == 0 {
return errors.New("Timeout waiting for http socket")
}
//time.Sleep(250 * time.Millisecond)
time.Sleep(250 * time.Millisecond)
}
}

Expand Down

0 comments on commit ff180fd

Please sign in to comment.