Skip to content

Commit 5a427c3

Browse files
committed
(Chore): Improve build image.
These changes aim at reducing the image size as well as ensure the package versions are closer to what is on live. This image is currently only used to test e2e tests. For that purpose currently, google-cloud-platform, docker and firefox are not needed. Signed-off-by: Victor Otieno <victor@slick.co.ke>
1 parent 03af519 commit 5a427c3

File tree

1 file changed

+3
-25
lines changed

1 file changed

+3
-25
lines changed

Dockerfile

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,8 @@
1-
FROM elixir:1.15.4-otp-25
1+
FROM elixir:1.15.4-otp-25-slim
22

33
RUN apt-get update -y \
44
&& apt-get -y install apt-transport-https curl lsb-release unzip ca-certificates gnupg
55

6-
# Prerequisites for `google-cloud-platform` - https://cloud.google.com/sdk/downloads#apt-get
7-
RUN export CLOUD_SDK_REPO="cloud-sdk-$(lsb_release -c -s)" \
8-
&& echo "deb http://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list \
9-
&& curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
10-
11-
# Prerequisites for `docker`
12-
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - \
13-
&& echo "deb https://download.docker.com/linux/debian $(lsb_release -cs) stable" | tee -a /etc/apt/sources.list.d/docker.list
14-
156
# Prerequisites for `node`
167
RUN mkdir -p /etc/apt/keyrings \
178
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
@@ -21,31 +12,18 @@ RUN mkdir -p /etc/apt/keyrings \
2112
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
2213
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
2314

24-
# install firefox
25-
ENV PATH /firefox:$PATH
26-
RUN FIREFOX_URL="https://download-installer.cdn.mozilla.net/pub/firefox/releases/85.0.2/linux-x86_64/en-US/firefox-85.0.2.tar.bz2" \
27-
FIREFOX_SHA256="98763f4b1526811967d71e1bbb9552a9a3fd877321ecb497083b9e313b528c31" \
28-
&& curl --silent --show-error --location --fail --retry 3 --output /tmp/firefox.tar.bz2 $FIREFOX_URL \
29-
&& echo "$FIREFOX_SHA256 /tmp/firefox.tar.bz2" | sha256sum -c \
30-
&& tar -jxf /tmp/firefox.tar.bz2 \
31-
&& rm /tmp/firefox.tar.bz2
32-
3315
# install chrome
3416
RUN curl --silent --show-error --location --fail --retry 3 --output /tmp/google-chrome-stable_current_amd64.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \
3517
&& (dpkg -i /tmp/google-chrome-stable_current_amd64.deb || apt-get -fy install) \
3618
&& rm -rf /tmp/google-chrome-stable_current_amd64.deb \
3719
&& sed -i 's|HERE/chrome"|HERE/chrome" --disable-setuid-sandbox --no-sandbox|g' \
3820
"/opt/google/chrome/google-chrome"
3921

40-
# Prerequisites for php7
22+
# Prerequisites for php8
4123
RUN wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg \
4224
&& sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
4325

4426
# Installs
4527
RUN apt-get update -y \
46-
&& apt-get install -y php7.2 nodejs=18.15.0-1nodesource1 yarn google-cloud-sdk docker-ce \
28+
&& apt-get install -y php8.2 nodejs=18.15.0-1nodesource1 yarn \
4729
&& apt reinstall fonts-noto-color-emoji
48-
49-
# Install docker-compose
50-
RUN curl -L https://github.com/docker/compose/releases/download/1.28.2/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose \
51-
&& chmod +x /usr/local/bin/docker-compose

0 commit comments

Comments
 (0)