-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
58 lines (47 loc) · 1.52 KB
/
Copy pathDockerfile
File metadata and controls
58 lines (47 loc) · 1.52 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# syntax=docker/dockerfile:1.9
ARG KC_VERSION
FROM ghcr.io/kitconcept/core-builder:${KC_VERSION:-latest} AS builder
# Install dependencies
RUN --mount=type=cache,target=/root/.cache \
--mount=type=bind,source=uv.lock,target=uv.lock \
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
uv sync \
--locked \
--no-dev \
--no-group test \
--group container \
--no-install-project
COPY . /src
WORKDIR /src
# Install package
RUN --mount=type=cache,target=/root/.cache \
uv sync \
--locked \
--no-dev \
--no-group test \
--group container \
--no-editable
# Move skeleton files to /app
RUN <<EOT
mv /app_skeleton/* /app
mv scripts/* /app/scripts/
EOT
# Compile translation files
RUN <<EOT
/app/bin/python /compile_mo.py
EOT
FROM ghcr.io/kitconcept/core-prod:${KC_VERSION:-latest}
LABEL maintainer="kitconcept GmbH <info@kitconcept.com>" \
org.label-schema.name="ghcr.io/kitconcept/kitconcept-intranet-backend" \
org.label-schema.description="A Plone distribution for Intranets with Plone. Created by kitconcept." \
org.label-schema.vendor="kitconcept GmbH"
ENV ALLOWED_DISTRIBUTIONS=kitconcept-intranet
# Copy the pre-built `/app` directory to the runtime container
# and change the ownership to user app and group app in one step.
COPY --from=builder --chown=500:500 /app /app
# Copy example content
COPY --chown=500:500 ./example_content /import
RUN <<EOT
ln -s /data /app/var
chown -R 500:500 /data
EOT