Skip to content

Commit

Permalink
Set image tag as 18.04
Browse files Browse the repository at this point in the history
Remove code specifig for Ubuntu 22.04
For Ubuntu libgdbm version available is 5 (not 6)
  • Loading branch information
rubensa committed Mar 27, 2024
1 parent 0a59ae9 commit 62254a0
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ jobs:
with:
DOCKER_REPOSITORY_NAME: rubensa
DOCKER_IMAGE_NAME: ubuntu-tini-dev
DOCKER_IMAGE_TAG: latest
DOCKER_IMAGE_TAG: 18.04
secrets: inherit
23 changes: 6 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rubensa/ubuntu-tini-user
FROM rubensa/ubuntu-tini-user:18.04
LABEL author="Ruben Suarez <[email protected]>"

# Architecture component of TARGETPLATFORM (platform of the build result)
Expand All @@ -17,8 +17,8 @@ RUN apt-get update
ENV DEBIAN_FRONTEND=noninteractive

# Install dependencies and other usefull software and libraries
RUN echo "# Installing curl, netcat, unzip, zip, build-essential, git, bison, libssl-dev, libyaml-dev, libreadline6-dev, zlib1g-dev, libncurses5-dev, libffi-dev, libgdbm6, libgdbm-dev, libdb-dev, libmysqlclient-dev, unixodbc-dev, libpq-dev, freetds-dev, libicu-dev, libxtst6, procps, lsb-release, openssh-client, p7zip-full, p7zip-rar, unrar, jq and bsdmainutils..." \
&& apt-get -y install --no-install-recommends curl netcat unzip zip build-essential git bison libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm6 libgdbm-dev libdb-dev libmysqlclient-dev unixodbc-dev libpq-dev freetds-dev libicu-dev libxtst6 procps lsb-release openssh-client p7zip-full p7zip-rar unrar jq bsdmainutils 2>&1 \
RUN echo "# Installing curl, netcat, unzip, zip, build-essential, git, bison, libssl-dev, libyaml-dev, libreadline6-dev, zlib1g-dev, libncurses5-dev, libffi-dev, libgdbm5, libgdbm-dev, libdb-dev, libmysqlclient-dev, unixodbc-dev, libpq-dev, freetds-dev, libicu-dev, libxtst6, procps, lsb-release, openssh-client, p7zip-full, p7zip-rar, unrar, jq and bsdmainutils..." \
&& apt-get -y install --no-install-recommends curl netcat unzip zip build-essential git bison libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm5 libgdbm-dev libdb-dev libmysqlclient-dev unixodbc-dev libpq-dev freetds-dev libicu-dev libxtst6 procps lsb-release openssh-client p7zip-full p7zip-rar unrar jq bsdmainutils 2>&1 \
&& if [ "$TARGETARCH" = "amd64" ]; then echo "# Installing rar..."; apt-get -y install --no-install-recommends rar 2>&1; fi

# Docker CLI Version (https://download.docker.com/linux/static/stable/)
Expand Down Expand Up @@ -195,7 +195,7 @@ ARG RBENV_VERSION=1.2.0
ARG RUBY_BUILD_VERSION=20240319
# rbenv installation directory
ENV RBENV_ROOT=/opt/rbenv
# Install Ruby Environment Manager (requires curl, autoconf, bison, build-essential, libssl-dev, libyaml-dev, libreadline6-dev, zlib1g-dev, libncurses5-dev, libffi-dev, libgdbm6, libgdbm-dev, libdb-dev)
# Install Ruby Environment Manager (requires curl, autoconf, bison, build-essential, libssl-dev, libyaml-dev, libreadline6-dev, zlib1g-dev, libncurses5-dev, libffi-dev, libgdbm5, libgdbm-dev, libdb-dev)
RUN echo "# Installing rbenv (with ruby-build)..." \
&& curl -o /tmp/rbenv-${RBENV_VERSION}.tar.gz -sSL https://github.com/rbenv/rbenv/archive/refs/tags/v${RBENV_VERSION}.tar.gz \
&& curl -o /tmp/ruby-build-${RUBY_BUILD_VERSION}.tar.gz -sSL https://github.com/rbenv/ruby-build/archive/refs/tags/v${RUBY_BUILD_VERSION}.tar.gz \
Expand Down Expand Up @@ -247,10 +247,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 18.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:18.04 ${OPENSSL_ROOT_1_0} ${OPENSSL_ROOT_1_0}
# Install OpenSSL 1.0
RUN echo "# Installing OpenSSL 1.0..." \
#
Expand All @@ -259,17 +259,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
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -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) 18.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) 18.04 to allow old Ruby versions to be installed.

## Building

Expand All @@ -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="18.04"
docker buildx build --platform=linux/amd64,linux/arm64 --no-cache \
-t "${DOCKER_REPOSITORY_NAME}/${DOCKER_IMAGE_NAME}:${DOCKER_IMAGE_TAG}" \
Expand All @@ -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="18.04"
# Get current user UID
USER_ID=$(id -u)
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

DOCKER_REPOSITORY_NAME="rubensa"
DOCKER_IMAGE_NAME="ubuntu-tini-dev"
DOCKER_IMAGE_TAG="latest"
DOCKER_IMAGE_TAG="18.04"

# see: https://github.com/docker/buildx/issues/495#issuecomment-761562905
#docker buildx build --platform=linux/amd64,linux/arm64 --no-cache --progress=plain --pull \
Expand Down
2 changes: 1 addition & 1 deletion run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

DOCKER_REPOSITORY_NAME="rubensa"
DOCKER_IMAGE_NAME="ubuntu-tini-dev"
DOCKER_IMAGE_TAG="latest"
DOCKER_IMAGE_TAG="18.04"

# Get current user UID
USER_ID=$(id -u)
Expand Down

0 comments on commit 62254a0

Please sign in to comment.