diff options
author | Sebastiaan van Stijn <github@gone.nl> | 2019-07-12 18:53:34 +0200 |
---|---|---|
committer | Christopher Crone <christopher.crone@docker.com> | 2019-10-03 15:49:26 +0200 |
commit | ea4fbd7ddf5ff1b7a9b4a1900522d51537387156 (patch) | |
tree | 5377728dd294d854befd299718df8664b7bee8a3 | |
parent | 546bc63244941e8aa22a408635d0bff554b1702b (diff) | |
download | docker-py-ea4fbd7ddf5ff1b7a9b4a1900522d51537387156.tar.gz |
Update to python 3.7 (buster) and use build-args
The build arg can be used to either test different versions, but
also makes it easier to "grep" when upgrading versions.
The output format of `gpg2 --list-secret-keys` changed in the version
installed on Buster, so `grep` was replaced with `awk` to address
the new output format;
Debian Jessie:
gpg2 --no-auto-check-trustdb --list-secret-keys
/root/.gnupg/secring.gpg
------------------------
sec 1024D/A7B21401 2018-04-25
uid Sakuya Izayoi <sakuya@gensokyo.jp>
ssb 1024g/C235E4CE 2018-04-25
Debian Buster:
gpg2 --no-auto-check-trustdb --list-secret-keys
/root/.gnupg/pubring.kbx
------------------------
sec dsa1024 2018-04-25 [SCA]
9781B87DAB042E6FD51388A5464ED987A7B21401
uid [ultimate] Sakuya Izayoi <sakuya@gensokyo.jp>
ssb elg1024 2018-04-25 [E]
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
-rw-r--r-- | Dockerfile | 4 | ||||
-rw-r--r-- | Dockerfile-docs | 4 | ||||
-rw-r--r-- | Dockerfile-py3 | 4 | ||||
-rw-r--r-- | tests/Dockerfile | 7 | ||||
-rw-r--r-- | tests/Dockerfile-dind-certs | 4 |
5 files changed, 16 insertions, 7 deletions
@@ -1,4 +1,6 @@ -FROM python:2.7 +ARG PYTHON_VERSION=2.7 + +FROM python:${PYTHON_VERSION} RUN mkdir /src WORKDIR /src diff --git a/Dockerfile-docs b/Dockerfile-docs index 105083e..9d11312 100644 --- a/Dockerfile-docs +++ b/Dockerfile-docs @@ -1,4 +1,6 @@ -FROM python:3.5 +ARG PYTHON_VERSION=3.7 + +FROM python:${PYTHON_VERSION} ARG uid=1000 ARG gid=1000 diff --git a/Dockerfile-py3 b/Dockerfile-py3 index d558ba3..22732de 100644 --- a/Dockerfile-py3 +++ b/Dockerfile-py3 @@ -1,4 +1,6 @@ -FROM python:3.6 +ARG PYTHON_VERSION=3.7 + +FROM python:${PYTHON_VERSION} RUN mkdir /src WORKDIR /src diff --git a/tests/Dockerfile b/tests/Dockerfile index 8f49cd2..f2f36b4 100644 --- a/tests/Dockerfile +++ b/tests/Dockerfile @@ -1,5 +1,6 @@ -ARG PYTHON_VERSION=3.6 -FROM python:$PYTHON_VERSION-jessie +ARG PYTHON_VERSION=3.7 + +FROM python:${PYTHON_VERSION} RUN apt-get update && apt-get -y install \ gnupg2 \ pass \ @@ -8,7 +9,7 @@ RUN apt-get update && apt-get -y install \ COPY ./tests/gpg-keys /gpg-keys RUN gpg2 --import gpg-keys/secret RUN gpg2 --import-ownertrust gpg-keys/ownertrust -RUN yes | pass init $(gpg2 --no-auto-check-trustdb --list-secret-keys | grep ^sec | cut -d/ -f2 | cut -d" " -f1) +RUN yes | pass init $(gpg2 --no-auto-check-trustdb --list-secret-key | awk '/^sec/{getline; $1=$1; print}') RUN gpg2 --check-trustdb ARG CREDSTORE_VERSION=v0.6.2 RUN curl -sSL -o /opt/docker-credential-pass.tar.gz \ diff --git a/tests/Dockerfile-dind-certs b/tests/Dockerfile-dind-certs index 9e8c042..2ab87ef 100644 --- a/tests/Dockerfile-dind-certs +++ b/tests/Dockerfile-dind-certs @@ -1,4 +1,6 @@ -FROM python:2.7 +ARG PYTHON_VERSION=2.7 + +FROM python:${PYTHON_VERSION} RUN mkdir /tmp/certs VOLUME /certs |