Skip to content

Commit

Permalink
chore: upgrade base image (#215)
Browse files Browse the repository at this point in the history
  • Loading branch information
nwittstruck authored Dec 29, 2023
1 parent 4d5dd0c commit d68edc1
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 71 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/on_push_branch__execute_ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
# Currently, this need to be synced manually with the Dockerfile. In the future, the workflow should be changed,
# so that a development container is built from the Dockerfile, pushed, and then re-used in the following steps.
# This would also remove the need to install cmake manually in each step:
container: hexpm/elixir:1.13.1-erlang-24.2-debian-bullseye-20210902-slim
container: hexpm/elixir:1.13.4-erlang-24.3.4.15-debian-bullseye-20231009-slim

steps:
# See https://github.com/actions/checkout
Expand All @@ -37,7 +37,7 @@ jobs:
# Containers must run in Linux based operating systems
runs-on: ubuntu-latest
# Docker Hub image that `container-job` executes in
container: hexpm/elixir:1.13.1-erlang-24.2-debian-bullseye-20210902-slim
container: hexpm/elixir:1.13.4-erlang-24.3.4.15-debian-bullseye-20231009-slim

needs: build_deps

Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:

check_mix_format:
runs-on: ubuntu-latest
container: hexpm/elixir:1.13.1-erlang-24.2-debian-bullseye-20210902-slim
container: hexpm/elixir:1.13.4-erlang-24.3.4.15-debian-bullseye-20231009-slim

needs: build_deps

Expand All @@ -107,7 +107,7 @@ jobs:

check_mix_gettext_extract_up_to_date:
runs-on: ubuntu-latest
container: hexpm/elixir:1.13.1-erlang-24.2-debian-bullseye-20210902-slim
container: hexpm/elixir:1.13.4-erlang-24.3.4.15-debian-bullseye-20231009-slim

needs: build_deps

Expand All @@ -127,7 +127,7 @@ jobs:

check_mix_sobelow:
runs-on: ubuntu-latest
container: hexpm/elixir:1.13.1-erlang-24.2-debian-bullseye-20210902-slim
container: hexpm/elixir:1.13.4-erlang-24.3.4.15-debian-bullseye-20231009-slim

needs: build_deps

Expand Down
50 changes: 0 additions & 50 deletions .github/workflows/on_workflow_dispatch__build_publish_release.yml

This file was deleted.

37 changes: 21 additions & 16 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,38 +12,43 @@
# - https://pkgs.org/ - resource for finding needed packages
# - Ex: hexpm/elixir:1.13.1-erlang-24.2-debian-bullseye-20210902-slim
#
ARG ELIXIR_VERSION=1.13.1
ARG OTP_VERSION=24.2
ARG DEBIAN_VERSION=bullseye-20210902-slim
ARG ELIXIR_VERSION=1.13.4
ARG OTP_VERSION=24.3.4.15
ARG DEBIAN_VERSION=bullseye-20231009-slim

ARG BUILDER_IMAGE="hexpm/elixir:${ELIXIR_VERSION}-erlang-${OTP_VERSION}-debian-${DEBIAN_VERSION}"
ARG RUNNER_IMAGE="debian:${DEBIAN_VERSION}"

# This is our base image for development as well as building the production image:
FROM ${BUILDER_IMAGE} as base

ENV NODE_URL=https://deb.nodesource.com/setup_16.x
# Install node
ENV NODE_MAJOR=18

# Install curl as a prerequisite for nodejs:
RUN apt-get -y update && apt-get install -y curl
RUN apt-get -y update

RUN apt-get install -y ca-certificates curl gnupg
RUN mkdir -p /etc/apt/keyrings
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg

RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list

# install build dependencies
RUN curl -fsSL $NODE_URL | bash - && \
apt-get install -y nodejs \
build-essential \
inotify-tools \
postgresql-client \
git \
cmake && \
apt-get clean && \
rm -f /var/lib/apt/lists/*_*
RUN apt-get update && apt-get install -y nodejs \
build-essential \
inotify-tools \
postgresql-client \
git \
cmake && \
apt-get clean && \
rm -f /var/lib/apt/lists/*_*

# prepare build dir
WORKDIR /app

# install hex + rebar
RUN mix local.hex --force && \
mix local.rebar --force
mix local.rebar --force

FROM base as development

Expand Down

0 comments on commit d68edc1

Please sign in to comment.