summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastiaan van Stijn <thaJeztah@users.noreply.github.com>2022-08-19 21:09:12 +0200
committerGitHub <noreply@github.com>2022-08-19 15:09:12 -0400
commit1c27ec1f0c34f6b9510f5caadada5fd8ecc430d9 (patch)
treef0d56a50e0bb6511f7a2b6fd07aca59566b3d8bc
parent2494d63f36eba0e1811f05e7b2136f8b30f7cdb7 (diff)
downloaddocker-py-1c27ec1f0c34f6b9510f5caadada5fd8ecc430d9.tar.gz
ci: use latest stable syntax for Dockerfiles (#3035)
I noticed one Dockerfile was pinned to 1.4; given that there's a backward compatibility guarantee on the stable syntax, the general recommendation is to use `dockerfile:1`, which makes sure that the latest stable release of the Dockerfile syntax is pulled before building. While changing, I also made some minor changes to some Dockerfiles to reduce some unneeded layers. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
-rw-r--r--Dockerfile2
-rw-r--r--Dockerfile-docs2
-rw-r--r--tests/Dockerfile4
-rw-r--r--tests/Dockerfile-dind-certs2
-rw-r--r--tests/Dockerfile-ssh-dind10
5 files changed, 15 insertions, 5 deletions
diff --git a/Dockerfile b/Dockerfile
index ef9b886..3476c6d 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,3 +1,5 @@
+# syntax=docker/dockerfile:1
+
ARG PYTHON_VERSION=3.10
FROM python:${PYTHON_VERSION}
diff --git a/Dockerfile-docs b/Dockerfile-docs
index e993822..11adbfe 100644
--- a/Dockerfile-docs
+++ b/Dockerfile-docs
@@ -1,3 +1,5 @@
+# syntax=docker/dockerfile:1
+
ARG PYTHON_VERSION=3.10
FROM python:${PYTHON_VERSION}
diff --git a/tests/Dockerfile b/tests/Dockerfile
index 2cac785..bf95cd6 100644
--- a/tests/Dockerfile
+++ b/tests/Dockerfile
@@ -1,5 +1,7 @@
-# syntax = docker/dockerfile:1.4
+# syntax=docker/dockerfile:1
+
ARG PYTHON_VERSION=3.10
+
FROM python:${PYTHON_VERSION}
ARG APT_MIRROR
diff --git a/tests/Dockerfile-dind-certs b/tests/Dockerfile-dind-certs
index 6e71189..288a340 100644
--- a/tests/Dockerfile-dind-certs
+++ b/tests/Dockerfile-dind-certs
@@ -1,3 +1,5 @@
+# syntax=docker/dockerfile:1
+
ARG PYTHON_VERSION=3.10
FROM python:${PYTHON_VERSION}
diff --git a/tests/Dockerfile-ssh-dind b/tests/Dockerfile-ssh-dind
index 22c707a..0da15aa 100644
--- a/tests/Dockerfile-ssh-dind
+++ b/tests/Dockerfile-ssh-dind
@@ -1,18 +1,20 @@
+# syntax=docker/dockerfile:1
+
ARG API_VERSION=1.41
ARG ENGINE_VERSION=20.10
FROM docker:${ENGINE_VERSION}-dind
RUN apk add --no-cache --upgrade \
- openssh
+ openssh
COPY tests/ssh/config/server /etc/ssh/
-RUN chmod -R 600 /etc/ssh
# set authorized keys for client paswordless connection
COPY tests/ssh/config/client/id_rsa.pub /root/.ssh/authorized_keys
-RUN chmod -R 600 /root/.ssh
# RUN echo "root:root" | chpasswd
-RUN ln -s /usr/local/bin/docker /usr/bin/docker
+RUN chmod -R 600 /etc/ssh \
+ && chmod -R 600 /root/.ssh \
+ && ln -s /usr/local/bin/docker /usr/bin/docker
EXPOSE 22