-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathContainerfile
42 lines (27 loc) · 902 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
# BUILD STAGE #########################
FROM rakudo-zef:2021.03 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 libxml2-dev
COPY META6.json .
RUN zef install --/test --deps-only .
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 .git .gitignore
# FINAL STAGE #########################
FROM alpine:3.13.4
# Install runtime dependencies
RUN apk add --no-cache openssl-dev libxml2-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 RAKUDOCIBOT_ORG_PORT="10000" \
RAKUDOCIBOT_ORG_HOST="0.0.0.0"
EXPOSE 10000
CMD raku -I. service.raku