2024-06-28 17:09:58 +00:00
|
|
|
FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine as build
|
|
|
|
|
2024-06-30 13:18:51 +00:00
|
|
|
RUN apk update && apk upgrade && apk add crystal shards openssl-dev zlib-dev {{ ship_packages | join(" ") }} {{ devel_packages | join(" ") }} && apk cache clean
|
2024-06-28 17:09:58 +00:00
|
|
|
|
|
|
|
WORKDIR /home/app
|
|
|
|
|
2024-06-28 20:42:10 +00:00
|
|
|
COPY shard.yml *.cr ./
|
2024-06-28 17:09:58 +00:00
|
|
|
RUN shards install
|
2024-06-28 22:15:42 +00:00
|
|
|
RUN shards build --release
|
|
|
|
RUN strip bin/*
|
2024-06-28 17:09:58 +00:00
|
|
|
|
|
|
|
FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine as ship
|
2024-07-08 00:50:10 +00:00
|
|
|
RUN apk update && apk upgrade && apk add pcre2 libgcc gc libevent curl {{ ship_packages | join " " }} && apk cache clean
|
2024-06-28 17:09:58 +00:00
|
|
|
RUN addgroup -S app && adduser app -S -G app
|
|
|
|
|
|
|
|
WORKDIR /home/app
|
|
|
|
USER app
|
|
|
|
|
2024-07-02 19:54:47 +00:00
|
|
|
COPY --from=build /home/app/bin/funko .
|
2024-06-28 17:09:58 +00:00
|
|
|
|
2024-07-02 19:54:47 +00:00
|
|
|
CMD ["./funko"]
|
2024-07-08 00:50:10 +00:00
|
|
|
HEALTHCHECK {{ healthcheck_options }} CMD {{ healthcheck_command }}
|