22 lines
722 B
Django/Jinja
22 lines
722 B
Django/Jinja
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
|
|
|
|
COPY shard.yml *.cr ./
|
|
RUN shards install
|
|
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
|
|
|
|
COPY --from=build /home/app/bin/funko .
|
|
|
|
CMD ["./funko"]
|
|
HEALTHCHECK {{ healthcheck_options }} CMD {{ healthcheck_command }} |