-
Notifications
You must be signed in to change notification settings - Fork 5
/
Containerfile
43 lines (28 loc) · 925 Bytes
/
Containerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# BUILD STAGE #########################
FROM rakudo-zef:2022.12 AS build
RUN mkdir /app
WORKDIR /app
# Copy and install deps first to not trash the podman cache on every source
# change.
# Install build dependencies
RUN apk add --no-cache openssl-dev
COPY META6.json .
RUN zef install --deps-only --/test .
COPY . .
RUN raku -c -I. service.raku
# Workaround for a recent podman bug, which ignores folders in .dockerignore
# https://github.com/containers/buildah/issues/1582
RUN rm -rf releases .git .gitignore
# FINAL STAGE #########################
FROM alpine:3.17.0
# Install runtime dependencies
RUN apk add --no-cache openssl-dev
COPY --from=build /app /app
COPY --from=build /usr/local /usr/local
WORKDIR /app
ENV PATH=$PATH:/usr/local/share/perl6/site/bin
ENV RAKUBREW_ORG_PORT="10000" \
RAKUBREW_ORG_HOST="0.0.0.0" \
RAKUBREW_ORG_RELEASES_DIR="/releases"
EXPOSE 10000
CMD raku -I. service.raku