Skip to content

Commit

Permalink
Merge pull request #87 from ndrean/dock-pnpm
Browse files Browse the repository at this point in the history
Dockerfile with pnpm and Elixir 1.16
  • Loading branch information
LuchoTurtle authored Mar 31, 2024
2 parents 7a46152 + 0008846 commit 2b5c4ae
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 6 deletions.
19 changes: 13 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,24 @@
# - https://pkgs.org/ - resource for finding needed packages
# - Ex: hexpm/elixir:1.15.7-erlang-26.0.2-debian-bullseye-20231009-slim
#
ARG ELIXIR_VERSION=1.15.7
ARG OTP_VERSION=26.0.2
ARG DEBIAN_VERSION=bullseye-20231009-slim
ARG ELIXIR_VERSION=1.16.2
ARG OTP_VERSION=25.3.2.10
ARG DEBIAN_VERSION=bullseye-20240130

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

FROM ${BUILDER_IMAGE} as builder

# install build dependencies (and curl for EXLA)
RUN apt-get update -y && apt-get install -y build-essential git curl libmagic-dev nodejs npm\
&& apt-get clean && rm -f /var/lib/apt/lists/*_*
RUN apt-get update -y && apt-get install -y build-essential git curl -y libmagic-dev && \
curl -sL https://deb.nodesource.com/setup_18.x | bash - && \
apt-get install -y nodejs && \
apt-get clean && rm -f /var/lib/apt/lists/*_* && \
node --version && \
npm --version

RUN npm install -g pnpm

# prepare build dir
WORKDIR /app
Expand Down Expand Up @@ -52,7 +58,8 @@ COPY lib lib
COPY assets assets

# Install dependencies for assets folder
RUN npm install --prefix assets
# RUN cd assets && pnpm install
RUN pnpm install --prefix assets

# compile assets
RUN mix assets.deploy
Expand Down
23 changes: 23 additions & 0 deletions assets/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2b5c4ae

Please sign in to comment.