chore: Refactoring base image for smaller image size
This commit is contained in:
parent
5d5bbb5add
commit
4c4cd65919
|
|
@ -16,16 +16,15 @@ RUN apt-get update \
|
||||||
gettext \
|
gettext \
|
||||||
python3-pip git ca-certificates \
|
python3-pip git ca-certificates \
|
||||||
&& pip install --no-cache-dir git+https://github.com/coderanger/supervisor-stdout@973ba19967cdaf46d9c1634d1675fc65b9574f6e \
|
&& pip install --no-cache-dir git+https://github.com/coderanger/supervisor-stdout@973ba19967cdaf46d9c1634d1675fc65b9574f6e \
|
||||||
&& apt-get remove --yes git python3-pip \
|
# Install MongoDB v5, Redis, PostgreSQL v13
|
||||||
&& apt-get autoremove --yes
|
&& curl --silent --show-error --location https://www.mongodb.org/static/pgp/server-5.0.asc | apt-key add - \
|
||||||
|
|
||||||
# Install MongoDB v5, Redis, PostgreSQL v13
|
|
||||||
RUN curl --silent --show-error --location https://www.mongodb.org/static/pgp/server-5.0.asc | apt-key add - \
|
|
||||||
&& echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-5.0.list \
|
&& echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-5.0.list \
|
||||||
&& echo "deb http://apt.postgresql.org/pub/repos/apt $(grep CODENAME /etc/lsb-release | cut -d= -f2)-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list \
|
&& echo "deb http://apt.postgresql.org/pub/repos/apt $(grep CODENAME /etc/lsb-release | cut -d= -f2)-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list \
|
||||||
&& curl --silent --show-error --location https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
|
&& curl --silent --show-error --location https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
|
||||||
&& apt update \
|
&& apt update \
|
||||||
&& apt-get install --no-install-recommends --yes mongodb-org redis postgresql-13 \
|
&& apt-get install --no-install-recommends --yes mongodb-org redis postgresql-13 \
|
||||||
|
&& apt-get remove --yes git python3-pip \
|
||||||
|
&& apt-get autoremove --yes \
|
||||||
&& apt-get clean
|
&& apt-get clean
|
||||||
|
|
||||||
# Install Java
|
# Install Java
|
||||||
|
|
@ -36,8 +35,8 @@ RUN set -o xtrace \
|
||||||
# Temporarily using hardcoded version in URL until we figure out a more elaborate/smarter solution.
|
# Temporarily using hardcoded version in URL until we figure out a more elaborate/smarter solution.
|
||||||
#&& version="$(curl --write-out '%{redirect_url}' 'https://github.com/adoptium/temurin17-binaries/releases/latest' | sed 's,.*jdk-,,')" \
|
#&& version="$(curl --write-out '%{redirect_url}' 'https://github.com/adoptium/temurin17-binaries/releases/latest' | sed 's,.*jdk-,,')" \
|
||||||
&& version="17.0.9+9" \
|
&& version="17.0.9+9" \
|
||||||
&& curl --location --output /tmp/java.tar.gz "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-$version/OpenJDK17U-jdk_$(uname -m | sed s/x86_64/x64/)_linux_hotspot_$(echo $version | tr + _).tar.gz" \
|
&& curl --location "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-$version/OpenJDK17U-jdk_$(uname -m | sed s/x86_64/x64/)_linux_hotspot_$(echo $version | tr + _).tar.gz" \
|
||||||
&& tar -xzf /tmp/java.tar.gz -C /opt/java --strip-components 1
|
| tar -xz -C /opt/java --strip-components 1
|
||||||
|
|
||||||
# Install NodeJS
|
# Install NodeJS
|
||||||
RUN set -o xtrace \
|
RUN set -o xtrace \
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user