faaso/runtimes/crystal/Dockerfile.j2

22 lines
722 B
Docker
Raw Normal View History

FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine as build
RUN apk update && apk upgrade && apk add crystal shards openssl-dev zlib-dev {{ ship_packages | join(" ") }} {{ devel_packages | join(" ") }} && apk cache clean
WORKDIR /home/app
2024-06-28 20:42:10 +00:00
COPY shard.yml *.cr ./
RUN shards install
2024-06-28 22:15:42 +00:00
RUN shards build --release
RUN strip bin/*
FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine as ship
RUN apk update && apk upgrade && apk add openssl pcre2 libgcc gc libevent curl {{ ship_packages | join " " }} && apk cache clean
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-07-02 19:54:47 +00:00
CMD ["./funko"]
HEALTHCHECK {{ healthcheck_options }} CMD {{ healthcheck_command }}