mirror of
https://github.com/docker/cli.git
synced 2026-11-06 13:10:41 -04:00
Add a "master" engine-version to the e2e matrix to catch regressions against the upcoming engine release before it reaches an rc. There is no "master" dind image, so just copy the engine binary from the moby/moby-bin:master image and put it into the latest dind image. Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
32 lines
1.3 KiB
Docker
32 lines
1.3 KiB
Docker
# syntax=docker/dockerfile:1
|
|
|
|
# ENGINE_VERSION is the version of the (docker-in-docker) Docker Engine to
|
|
# test against.
|
|
ARG ENGINE_VERSION=29
|
|
# ENGINE_SOURCE is "dind" or "moby-bin" (moby/moby-bin:master).
|
|
ARG ENGINE_SOURCE=dind
|
|
|
|
FROM docker:${ENGINE_VERSION}-dind AS engine-dind
|
|
|
|
# moby/moby-bin only has the daemon binaries.
|
|
FROM docker:dind AS engine-moby-bin
|
|
COPY --link --from=moby/moby-bin:master / /usr/local/bin/
|
|
|
|
FROM engine-${ENGINE_SOURCE}
|
|
|
|
# the openssh-client update is needed for security reasons when using docker:23.0-dind, currently maintained as an lts by mirantis
|
|
RUN apk --no-cache add openssl openssh-client openssh-server shadow && \
|
|
apk --no-cache upgrade openssl openssh-client openssh-server && \
|
|
useradd --create-home --shell /bin/sh --password $(head -c32 /dev/urandom | base64) penguin && \
|
|
usermod -aG docker penguin && \
|
|
ssh-keygen -A
|
|
# Trust the tlsregistry CA so dockerd connects without --insecure-registry.
|
|
COPY registry/certs/ca.crt /usr/local/share/ca-certificates/tlsregistry-ca.crt
|
|
RUN update-ca-certificates
|
|
# workaround: ssh session excludes /usr/local/bin from $PATH
|
|
RUN ln -s /usr/local/bin/docker /usr/bin/docker
|
|
COPY ./connhelper-ssh/entrypoint.sh /
|
|
EXPOSE 22
|
|
ENTRYPOINT ["/entrypoint.sh"]
|
|
# usage: docker run --privileged -e TEST_CONNHELPER_SSH_ID_RSA_PUB=$(cat ~/.ssh/id_rsa.pub) -p 22 $THIS_IMAGE
|