This commit is contained in:
parent
93df514683
commit
2658538e20
1 changed files with 5 additions and 7 deletions
12
Dockerfile
12
Dockerfile
|
@ -1,12 +1,11 @@
|
||||||
# syntax=docker/dockerfile:1
|
# syntax=docker/dockerfile:1
|
||||||
|
|
||||||
FROM ocaml/opam:alpine-3.19-ocaml-5.1 AS builder
|
FROM ocaml/opam:alpine-3.20-ocaml-5.2 AS builder
|
||||||
WORKDIR /usr/src/pusk
|
WORKDIR /usr/src/pusk
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
RUN apk update && \
|
RUN apk add gmp-dev pcre-dev openssl-dev && \
|
||||||
apk add gmp-dev pcre-dev openssl-dev && \
|
|
||||||
chown -R opam:opam .
|
chown -R opam:opam .
|
||||||
|
|
||||||
USER opam
|
USER opam
|
||||||
|
@ -14,13 +13,12 @@ RUN opam install -y dune cohttp-lwt-unix dotenv twostep lwt_ssl yojson core && \
|
||||||
eval $(opam env) && \
|
eval $(opam env) && \
|
||||||
dune build --profile=release
|
dune build --profile=release
|
||||||
|
|
||||||
FROM alpine:3.18
|
FROM alpine:3.20
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
RUN apk update && \
|
RUN apk add --no-cache \
|
||||||
apk add dumb-init firefox libc6-compat pcre-dev && \
|
dumb-init firefox libc6-compat pcre-dev
|
||||||
rm -rf /var/cache/apk/*
|
|
||||||
|
|
||||||
COPY --from=builder /usr/src/pusk/_build/default/bin/main.exe /app/pusk
|
COPY --from=builder /usr/src/pusk/_build/default/bin/main.exe /app/pusk
|
||||||
COPY --from=builder /usr/src/pusk/LICENSE /app/pusk
|
COPY --from=builder /usr/src/pusk/LICENSE /app/pusk
|
||||||
|
|
Loading…
Reference in a new issue