Skip to content

Commit 1c27ec1

Browse files
authored
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 <[email protected]>
1 parent 2494d63 commit 1c27ec1

File tree

5 files changed

+15
-5
lines changed

5 files changed

+15
-5
lines changed

Dockerfile

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# syntax=docker/dockerfile:1
2+
13
ARG PYTHON_VERSION=3.10
24

35
FROM python:${PYTHON_VERSION}

Dockerfile-docs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# syntax=docker/dockerfile:1
2+
13
ARG PYTHON_VERSION=3.10
24

35
FROM python:${PYTHON_VERSION}

tests/Dockerfile

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
# syntax = docker/dockerfile:1.4
1+
# syntax=docker/dockerfile:1
2+
23
ARG PYTHON_VERSION=3.10
4+
35
FROM python:${PYTHON_VERSION}
46

57
ARG APT_MIRROR

tests/Dockerfile-dind-certs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# syntax=docker/dockerfile:1
2+
13
ARG PYTHON_VERSION=3.10
24

35
FROM python:${PYTHON_VERSION}

tests/Dockerfile-ssh-dind

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
1+
# syntax=docker/dockerfile:1
2+
13
ARG API_VERSION=1.41
24
ARG ENGINE_VERSION=20.10
35

46
FROM docker:${ENGINE_VERSION}-dind
57

68
RUN apk add --no-cache --upgrade \
7-
openssh
9+
openssh
810

911
COPY tests/ssh/config/server /etc/ssh/
10-
RUN chmod -R 600 /etc/ssh
1112

1213
# set authorized keys for client paswordless connection
1314
COPY tests/ssh/config/client/id_rsa.pub /root/.ssh/authorized_keys
14-
RUN chmod -R 600 /root/.ssh
1515

1616
# RUN echo "root:root" | chpasswd
17-
RUN ln -s /usr/local/bin/docker /usr/bin/docker
17+
RUN chmod -R 600 /etc/ssh \
18+
&& chmod -R 600 /root/.ssh \
19+
&& ln -s /usr/local/bin/docker /usr/bin/docker
1820
EXPOSE 22

0 commit comments

Comments
 (0)