lasthourcloud/docker/testing-host/Dockerfile

38 lines
1.8 KiB
Docker
Raw Normal View History

2023-05-15 13:13:34 +00:00
FROM alpine:3.17
ARG TARGETPLATFORM
# https://download.docker.com/linux/static/stable/
2023-06-15 11:43:16 +00:00
ARG DOCKER_VERSION=23.0.6
# https://github.com/docker/compose/releases
2023-06-14 10:48:29 +00:00
ARG DOCKER_COMPOSE_VERSION=2.18.1
2023-05-15 12:21:30 +00:00
# https://github.com/docker/buildx/releases
2023-06-13 09:33:08 +00:00
ARG DOCKER_BUILDX_VERSION=0.10.5
# https://github.com/buildpacks/pack/releases
2023-05-15 12:21:30 +00:00
ARG PACK_VERSION=0.29.0
# https://github.com/railwayapp/nixpacks/releases
2023-06-13 09:33:08 +00:00
ARG NIXPACKS_VERSION=1.9.0
2023-05-15 13:13:34 +00:00
USER root
WORKDIR /root
2023-07-28 12:44:26 +00:00
RUN apk add --no-cache bash curl git git-lfs openssh-client openssh-server tar tini postgresql-client lsof
2023-05-15 13:13:34 +00:00
RUN mkdir -p ~/.docker/cli-plugins
2023-05-15 12:21:30 +00:00
RUN if [[ ${TARGETPLATFORM} == 'linux/amd64' ]]; then \
curl -sSL https://github.com/docker/buildx/releases/download/v${DOCKER_BUILDX_VERSION}/buildx-v${DOCKER_BUILDX_VERSION}.linux-amd64 -o ~/.docker/cli-plugins/docker-buildx && \
curl -sSL https://github.com/docker/compose/releases/download/v${DOCKER_COMPOSE_VERSION}/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose && \
(curl -sSL https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VERSION}.tgz | tar -C /usr/bin/ --no-same-owner -xzv --strip-components=1 docker/docker) && \
(curl -sSL https://github.com/buildpacks/pack/releases/download/v${PACK_VERSION}/pack-v${PACK_VERSION}-linux.tgz | tar -C /usr/local/bin/ --no-same-owner -xzv pack) && \
curl -sSL https://nixpacks.com/install.sh | bash && \
chmod +x ~/.docker/cli-plugins/docker-compose /usr/bin/docker /usr/local/bin/pack /root/.docker/cli-plugins/docker-buildx \
;fi
2023-05-15 13:13:34 +00:00
# Setup sshd
RUN ssh-keygen -A
RUN mkdir -p /run/sshd
RUN mkdir -p ~/.ssh
RUN echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFuGmoeGq/pojrsyP1pszcNVuZx9iFkCELtxrh31QJ68 coolify@coolify-instance" >> ~/.ssh/authorized_keys
EXPOSE 22
2023-05-15 13:13:34 +00:00
ENTRYPOINT ["/sbin/tini", "--"]
CMD ["/usr/sbin/sshd", "-D", "-o", "ListenAddress=0.0.0.0"]