From 241d694935b95882ee778eecaaf10fcaad47e278 Mon Sep 17 00:00:00 2001 From: Ruben Suarez Date: Sun, 7 Jun 2020 14:06:26 +0200 Subject: [PATCH] Set image tag as 20.04 Remove code specifig for Ubuntu 22.04 --- .github/workflows/main.yml | 2 +- Dockerfile | 17 +++-------------- README.md | 6 +++--- build.sh | 2 +- run.sh | 2 +- 5 files changed, 9 insertions(+), 20 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9af00ae..5b22875 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,5 +17,5 @@ jobs: with: DOCKER_REPOSITORY_NAME: rubensa DOCKER_IMAGE_NAME: ubuntu-tini-dev - DOCKER_IMAGE_TAG: latest + DOCKER_IMAGE_TAG: 20.04 secrets: inherit diff --git a/Dockerfile b/Dockerfile index 261d566..a5795f4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM rubensa/ubuntu-tini-user +FROM rubensa/ubuntu-tini-user:20.04 LABEL author="Ruben Suarez " # Architecture component of TARGETPLATFORM (platform of the build result) @@ -256,10 +256,10 @@ RUN echo "# Installing rbenv (with ruby-build)..." \ && curl -o /usr/share/bash-completion/completions/ruby -sSL https://raw.githubusercontent.com/mernen/completion-ruby/main/completion-ruby \ && chmod 644 /usr/share/bash-completion/completions/ruby -# Ubuntu 22.04 comes with OpenSSL 3.0 and Ruby versions earlier than 2.4 used OpenSSL 1.0 +# Ubuntu 20.04 comes with OpenSSL 1.1 and Ruby versions earlier than 2.4 used OpenSSL 1.0 # openssl installation directory ENV OPENSSL_ROOT_1_0=/opt/openssl-1.0 -COPY --from=rubensa/ubuntu-openssl-old ${OPENSSL_ROOT_1_0} ${OPENSSL_ROOT_1_0} +COPY --from=rubensa/ubuntu-openssl-old:20.04 ${OPENSSL_ROOT_1_0} ${OPENSSL_ROOT_1_0} # Install OpenSSL 1.0 RUN echo "# Installing OpenSSL 1.0..." \ # @@ -268,17 +268,6 @@ RUN echo "# Installing OpenSSL 1.0..." \ && ln -s /etc/ssl/certs ${OPENSSL_ROOT_1_0} # Use RUBY_CONFIGURE_OPTS=--with-openssl-dir=${OPENSSL_ROOT_1_0} before the command to install the ruby version < 2.4 -# Ubuntu 22.04 comes with OpenSSL 3.0 and Ruby versions earlier than 3.1 used OpenSSL 1.1 -# openssl installation directory -ENV OPENSSL_ROOT_1_1=/opt/openssl-1.1 -COPY --from=rubensa/ubuntu-openssl-old ${OPENSSL_ROOT_1_1} ${OPENSSL_ROOT_1_1} -# Install OpenSSL 1.1 -RUN echo "# Installing OpenSSL 1.1..." \ - # Link the system's certs to OpenSSL directory - && rm -rf ${OPENSSL_ROOT_1_1}/certs \ - && ln -s /etc/ssl/certs ${OPENSSL_ROOT_1_1} -# Use RUBY_CONFIGURE_OPTS=--with-openssl-dir=${OPENSSL_ROOT_1_1} before the command to install the ruby version < 3.1 - # .Net installer version (https://docs.microsoft.com/en-us/dotnet/core/install/linux-scripted-manual#scripted-install) ARG DOTNET_INSTALLER_VERSION=v1 # Use this path for shared installation diff --git a/README.md b/README.md index 73507e3..217bf35 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Docker image with development tools -This is a Docker image based on [rubensa/ubuntu-tini-user](https://github.com/rubensa/docker-ubuntu-tini-user) and includes various development tools. This image includes [old openssl](https://www.openssl.org/source/old/) version builds from [rubensa/ubuntu-openssl-old](https://github.com/rubensa/docker-ubuntu-openssl-old) to allow old Ruby versions to be installed. +This is a Docker image based on [rubensa/ubuntu-tini-user](https://github.com/rubensa/docker-ubuntu-tini-user) 20.04 and includes various development tools. This image includes [old openssl](https://www.openssl.org/source/old/) version builds from [rubensa/ubuntu-openssl-old](https://github.com/rubensa/docker-ubuntu-openssl-old) 20.04 to allow old Ruby versions to be installed. ## Building @@ -11,7 +11,7 @@ You can build the image like this: DOCKER_REPOSITORY_NAME="rubensa" DOCKER_IMAGE_NAME="ubuntu-tini-dev" -DOCKER_IMAGE_TAG="latest" +DOCKER_IMAGE_TAG="20.04" docker buildx build --platform=linux/amd64,linux/arm64 --no-cache \ -t "${DOCKER_REPOSITORY_NAME}/${DOCKER_IMAGE_NAME}:${DOCKER_IMAGE_TAG}" \ @@ -32,7 +32,7 @@ You can run the container like this (change --rm with -d if you don't want the c DOCKER_REPOSITORY_NAME="rubensa" DOCKER_IMAGE_NAME="ubuntu-tini-dev" -DOCKER_IMAGE_TAG="latest" +DOCKER_IMAGE_TAG="20.04" # Get current user UID USER_ID=$(id -u) diff --git a/build.sh b/build.sh index 4726979..a8b9de2 100755 --- a/build.sh +++ b/build.sh @@ -2,7 +2,7 @@ DOCKER_REPOSITORY_NAME="rubensa" DOCKER_IMAGE_NAME="ubuntu-tini-dev" -DOCKER_IMAGE_TAG="latest" +DOCKER_IMAGE_TAG="20.04" # see: https://github.com/docker/buildx/issues/495#issuecomment-761562905 #docker buildx build --platform=linux/amd64,linux/arm64 --no-cache --progress=plain --pull \ diff --git a/run.sh b/run.sh index f856f94..81c5183 100755 --- a/run.sh +++ b/run.sh @@ -2,7 +2,7 @@ DOCKER_REPOSITORY_NAME="rubensa" DOCKER_IMAGE_NAME="ubuntu-tini-dev" -DOCKER_IMAGE_TAG="latest" +DOCKER_IMAGE_TAG="20.04" # Get current user UID USER_ID=$(id -u)