Cleanup image building code, refactored, fewer exposed ports, templated files in runtime

This commit is contained in:
2024-06-30 10:18:51 -03:00
parent 4a6d77d0f4
commit 6a678944a0
7 changed files with 70 additions and 56 deletions

View File

@ -1,5 +1,5 @@
FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine as build
RUN apk add crystal shards yaml-dev openssl-dev zlib-dev
RUN apk add crystal shards yaml-dev openssl-dev zlib-dev libxml2-dev
RUN addgroup -S app && adduser app -S -G app
WORKDIR /home/app
COPY shard.yml ./
@ -10,7 +10,7 @@ RUN shards build -d --error-trace
RUN strip bin/faaso-daemon
FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine as ship
RUN apk add tinyproxy multirun openssl zlib yaml pcre2 gc libevent libgcc
RUN apk add tinyproxy multirun openssl zlib yaml pcre2 gc libevent libgcc libxml2
# Unprivileged user
RUN addgroup -S app && adduser app -S -G app