Skip to content
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
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM python:2.7
ARG PYTHON_VERSION=2.7

FROM python:${PYTHON_VERSION}

RUN mkdir /src
WORKDIR /src
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile-docs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM python:3.5
ARG PYTHON_VERSION=3.7

FROM python:${PYTHON_VERSION}

ARG uid=1000
ARG gid=1000
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile-py3
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM python:3.6
ARG PYTHON_VERSION=3.7

FROM python:${PYTHON_VERSION}

RUN mkdir /src
WORKDIR /src
Expand Down
7 changes: 4 additions & 3 deletions tests/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
ARG PYTHON_VERSION=3.6
FROM python:$PYTHON_VERSION-jessie
ARG PYTHON_VERSION=3.7
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be ARG PYTHON_VERSION=3.7-stretch to keep the same level of specificity in the TAG?
Or that removal was intentional?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They're aliases. Removing it allows overriding it with PYTHON_VERSION=3.6-jessie although that would now fail because of the gpg2 change.

Not sure if there was a specific reason to add the -jessie suffix; I couldn't find one directly

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm.. checking here, It's not exactly the same image:

REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
python              3.7-stretch         71c6ddda7cab        2 days ago          941MB
python              3.7                 42d620af35be        2 days ago          918MB

I'm not against changing to 3.7 instead of 3.7-stretch.
My point is just that we have to know it's a different image.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you check the image's digest as well? Was your image cache out of date perhaps?

docker manifest inspect python:3.7
{
   "schemaVersion": 2,
   "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
   "manifests": [
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 2217,
         "digest": "sha256:11454cd111137f54f2c91a624ab16b88d6dd31092a6f7fa267dea5e21b9f0a77",
         "platform": {
            "architecture": "amd64",
            "os": "linux"
         }
      },

docker manifest inspect python:3.7-buster 
{
   "schemaVersion": 2,
   "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
   "manifests": [
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 2217,
         "digest": "sha256:11454cd111137f54f2c91a624ab16b88d6dd31092a6f7fa267dea5e21b9f0a77",
         "platform": {
            "architecture": "amd64",
            "os": "linux"
         }
      },


docker manifest inspect python:3.7.4
{
   "schemaVersion": 2,
   "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
   "manifests": [
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 2217,
         "digest": "sha256:11454cd111137f54f2c91a624ab16b88d6dd31092a6f7fa267dea5e21b9f0a77",
         "platform": {
            "architecture": "amd64",
            "os": "linux"
         }
      },

docker manifest inspect python:3.7.4-buster
{
   "schemaVersion": 2,
   "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
   "manifests": [
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 2217,
         "digest": "sha256:11454cd111137f54f2c91a624ab16b88d6dd31092a6f7fa267dea5e21b9f0a77",
         "platform": {
            "architecture": "amd64",
            "os": "linux"
         }
      },

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just removed all my images and docker pull python:3.7 and docker pull python:3.7-stretch. By the way, I don't see python:3.7-stretch in your message.
My inspect on python:3.7-stretch results in:

$ docker manifest inspect python:3.7-stretch
{
   "schemaVersion": 2,
   "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
   "manifests": [
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 2218,
         "digest": "sha256:4cb0e5e9861fad660bbe72f0ae5a35e982daad0b7106612aa8ee4c9277faa7d6",
         "platform": {
            "architecture": "amd64",
            "os": "linux"
         }
      },
...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh! 🤦‍♂ now see you're comparing with -stretch, but 3.7 is equivalent to -buster (which is current stable)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahhh... Ok! I didn't know about buster (since it was released July 6th, 2019). In my head stretch was still the current stable. Sorry for that 🤦‍♂️
In this case, YES! You are right! I drop my charges 😅


FROM python:${PYTHON_VERSION}
RUN apt-get update && apt-get -y install \
gnupg2 \
pass \
Expand All @@ -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 \
Expand Down
4 changes: 3 additions & 1 deletion tests/Dockerfile-dind-certs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM python:2.7
ARG PYTHON_VERSION=2.7

FROM python:${PYTHON_VERSION}
RUN mkdir /tmp/certs
VOLUME /certs

Expand Down