From 71311555a4aa486e1318d0cb9d219fe2fa58f411 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Tue, 17 Sep 2019 01:34:54 +0200 Subject: [PATCH] New Pebble version (#16) Allow to build from different remote as well. --- Dockerfile | 15 +++++++++++---- controller.py | 2 +- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index e95a8cd..ac0ed53 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,17 @@ -FROM golang:1.12-stretch as builder +FROM golang:1.13-stretch as builder # Install pebble -ARG PEBBLE_CHECKOUT="c65a2f3c2be48868db01363f32d1d99c77281946" +ARG PEBBLE_REMOTE= +ARG PEBBLE_CHECKOUT="7e026bbfe639ff65dbafacd1b4259a660a8c513f" ENV GOPATH=/go -RUN go get -u github.com/letsencrypt/pebble/... && \ +RUN go get -v -u github.com/letsencrypt/pebble/... && \ cd /go/src/github.com/letsencrypt/pebble && \ - git checkout ${PEBBLE_CHECKOUT} && \ + if [ "${PEBBLE_REMOTE}" != "" ]; then \ + git remote add other ${PEBBLE_REMOTE} && \ + git fetch other && \ + git checkout -b other-${PEBBLE_CHECKOUT} --track other/${PEBBLE_CHECKOUT}; \ + else \ + git checkout ${PEBBLE_CHECKOUT}; \ + fi && \ go install ./... FROM python:3.6-slim-stretch diff --git a/controller.py b/controller.py index a302800..b157271 100755 --- a/controller.py +++ b/controller.py @@ -226,7 +226,7 @@ def get_root_certificate_pebble(index): return urllib.request.urlopen("https://localhost:15000/roots/{0}".format(index), context=ctx).read() -@app.route('/intermediate-certificate-for-ca') +@app.route('/intermediate-certificate-for-ca/') def get_intermediate_certificate_pebble(index): ctx = ssl.create_default_context() ctx.check_hostname = False