git.iko.soy/typeable/oauth2-proxy
on master help sign in
Merge pull request #209 from dekimsey/improve-docker-rebuild-caching

Move docker dep commands to earlier in the build

commite952ab4bdfd1a7c7b3b77e29e202b57c9af4325d authorJoel Speed <Joel.speed@hotmail.co.uk> dateMon 15 Jul 2019, 16:09 (7 years ago) parentd7e88a4816c2a6
5 files changed+14−6
CHANGELOG.md+1 Dockerfile+4−1 Dockerfile.arm64+4−1 Dockerfile.armv6+4−1 configure+1−3
CHANGELOG.md+1
@@ -31,6 +31,7 @@
3131
3232## Changes since v3.2.0
3333
34+- [#209](https://github.com/pusher/outh2_proxy/pull/209) Improve docker build caching of layers (@dekimsey)
3435- [#186](https://github.com/pusher/oauth2_proxy/pull/186) Make config consistent (@JoelSpeed)
3536- [#187](https://github.com/pusher/oauth2_proxy/pull/187) Move root packages to pkg folder (@JoelSpeed)
3637- [#65](https://github.com/pusher/oauth2_proxy/pull/65) Improvements to authenticate requests with a JWT bearer token in the `Authorization` header via
Dockerfile+4−1
@@ -7,11 +7,14 @@ RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.s
77
88# Copy sources
99WORKDIR $GOPATH/src/github.com/pusher/oauth2_proxy
10−COPY . .
1110
1211# Fetch dependencies
12+COPY Gopkg.toml Gopkg.lock ./
1313RUN dep ensure --vendor-only
1414
15+# Now pull in our code
16+COPY . .
17+
1518# Build binary and make sure there is at least an empty key file.
1619# This is useful for GCP App Engine custom runtime builds, because
1720# you cannot use multiline variables in their app.yaml, so you have to
Dockerfile.arm64+4−1
@@ -7,11 +7,14 @@ RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.s
77
88# Copy sources
99WORKDIR $GOPATH/src/github.com/pusher/oauth2_proxy
10−COPY . .
1110
1211# Fetch dependencies
12+COPY Gopkg.toml Gopkg.lock ./
1313RUN dep ensure --vendor-only
1414
15+# Now pull in our code
16+COPY . .
17+
1518# Build binary and make sure there is at least an empty key file.
1619# This is useful for GCP App Engine custom runtime builds, because
1720# you cannot use multiline variables in their app.yaml, so you have to
Dockerfile.armv6+4−1
@@ -7,11 +7,14 @@ RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.s
77
88# Copy sources
99WORKDIR $GOPATH/src/github.com/pusher/oauth2_proxy
10−COPY . .
1110
1211# Fetch dependencies
12+COPY Gopkg.toml Gopkg.lock ./
1313RUN dep ensure --vendor-only
1414
15+# Now pull in our code
16+COPY . .
17+
1518# Build binary and make sure there is at least an empty key file.
1619# This is useful for GCP App Engine custom runtime builds, because
1720# you cannot use multiline variables in their app.yaml, so you have to
configure+1−3
@@ -116,9 +116,7 @@ check_go_env() {
116116
117117cd ${0%/*}
118118
119−if [ ! -f .env ]; then
120− rm .env
121−fi
119+rm -fv .env
122120
123121check_for make
124122check_for awk