diff --git a/k8s/Dockerfile b/k8s/Dockerfile index af5c61d6..608fac74 100644 --- a/k8s/Dockerfile +++ b/k8s/Dockerfile @@ -31,29 +31,21 @@ RUN apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends build-essential git curl libsnmp-dev \ && rm -rf /var/lib/apt/lists/* -# Install Gleam compiler -ARG GLEAM_VERSION=1.15.2 -RUN curl -fsSL https://github.com/gleam-lang/gleam/releases/download/v${GLEAM_VERSION}/gleam-v${GLEAM_VERSION}-x86_64-unknown-linux-musl.tar.gz \ - | tar xz -C /usr/local/bin/ - # prepare build dir WORKDIR /app # set build ENV ENV MIX_ENV="prod" -# install hex + rebar + mix_gleam archive (must use cache mounts so they -# persist into subsequent cache-mounted steps) +# install hex + rebar RUN --mount=type=cache,target=/root/.hex \ --mount=type=cache,target=/root/.mix \ mix local.hex --force \ - && mix local.rebar --force \ - && mix archive.install hex mix_gleam --force + && mix local.rebar --force # install mix dependencies -COPY mix.exs mix.lock gleam.toml ./ +COPY mix.exs mix.lock ./ COPY vendor vendor -COPY src src RUN --mount=type=cache,target=/root/.hex \ --mount=type=cache,target=/root/.mix \ mix deps.get --only $MIX_ENV