feat: add dockerfile to make fetch system deps

This commit is contained in:
Joao P Dubas 2023-11-11 20:00:44 +00:00
parent 6a0d6623ce
commit 1c40e82fbd
2 changed files with 14 additions and 1 deletions

10
Dockerfile Normal file
View File

@ -0,0 +1,10 @@
FROM elixir:1.15.7-slim AS builder
RUN apt-get update \
&& apt-get -y install make
WORKDIR /opt/app
COPY ./mix.exs ./
COPY ./mix.lock ./
RUN mix do local.hex --force, local.rebar --force \
&& mix do deps.get, deps.compile

View File

@ -13,7 +13,10 @@ services:
- 'db_data:/var/lib/postgresql/data'
restart: unless-stopped
app:
image: 'elixir:1.15.7-slim'
image: &app_image 'joaodubas/ex_trainer:${EX_TRAINER_TAG:-dev}'
build:
target: builder
context: .
hostname: app
depends_on:
- db