|
1 | | -# syntax=docker/dockerfile:1.4 |
| 1 | +ARG NODE_VERSION=20 |
| 2 | +FROM docker.io/library/node:${NODE_VERSION}-alpine AS build |
2 | 3 |
|
3 | | -ARG NODE_VERSION=16 |
4 | | -FROM node:${NODE_VERSION}-alpine as build |
5 | | - |
6 | | -RUN apk add --no-cache git |
7 | 4 | WORKDIR /src |
8 | 5 | COPY package.json . |
9 | 6 | COPY package-lock.json . |
10 | | -RUN npm i |
| 7 | +RUN npm ci |
11 | 8 | COPY / . |
12 | 9 |
|
13 | | -ARG PUBLIC_URL=/ |
14 | | -ARG REACT_APP_SETTINGS_PATH=/editor-settings.toml |
| 10 | +ARG PUBLIC_URL=/editor-ui |
| 11 | +ARG VITE_APP_SETTINGS_PATH=/ui/config/editor/editor-settings.toml |
| 12 | +ARG VERSION=unknown |
| 13 | +ARG BUILD_DATE=unknown |
| 14 | +ARG GIT_COMMIT=unknown |
15 | 15 | RUN npm run build |
16 | 16 |
|
17 | 17 |
|
18 | | -ARG NODE_VERSION=16 |
19 | | -FROM node:${NODE_VERSION}-alpine as caddy |
20 | | - |
21 | | -RUN apk add --no-cache curl |
22 | | - |
23 | | -ARG CADDY_VERSION=2.5.1 |
24 | | - |
25 | | -RUN curl -sSL "https://github.com/caddyserver/caddy/releases/download/v${CADDY_VERSION}/caddy_${CADDY_VERSION}_linux_amd64.tar.gz" | tar xzf - caddy \ |
26 | | - && chown 0:0 caddy \ |
27 | | - && chmod +x caddy |
28 | | -RUN mkdir -p /rootfs/config /rootfs/data \ |
29 | | - && chown 1000:1000 /rootfs/config /rootfs/data |
30 | | - |
31 | | - |
32 | | -FROM scratch |
33 | | - |
34 | | -ENV XDG_CONFIG_HOME /config |
35 | | -ENV XDG_DATA_HOME /data |
36 | | - |
37 | | -COPY <<EOF /Caddyfile |
38 | | -{ |
39 | | - admin off |
40 | | -} |
41 | | - |
42 | | -:80 { |
43 | | - root * /www |
44 | | - file_server |
45 | | -} |
46 | | - |
47 | | -:2019 { |
48 | | - metrics /metrics |
49 | | - respond /healthz 200 |
50 | | -} |
51 | | -EOF |
52 | | - |
53 | | -COPY <<EOF /etc/nsswitch.conf |
54 | | -hosts: files dns |
55 | | -EOF |
56 | | - |
57 | | -COPY --from=caddy /rootfs / |
58 | | -COPY --from=caddy /caddy / |
59 | | -COPY --from=build /src/build /www |
60 | | - |
61 | | -USER 1000:1000 |
| 18 | +FROM rg.nl-ams.scw.cloud/shio-solutions/infra/static-site:1 |
62 | 19 |
|
63 | | -EXPOSE 80 |
64 | | -EXPOSE 443 |
65 | | -EXPOSE 2019 |
| 20 | +ARG PUBLIC_URL=/editor-ui |
| 21 | +ARG VERSION=unknown |
| 22 | +ARG BUILD_DATE=unknown |
| 23 | +ARG GIT_COMMIT=unknown |
66 | 24 |
|
67 | | -LABEL org.opencontainers.image.title "Opencast Video Editor" |
68 | | -LABEL org.opencontainers.image.description "Web-based video editor for Opencast" |
69 | | -LABEL org.opencontainers.image.vendor "Opencast" |
70 | | -LABEL org.opencontainers.image.licenses "Apache-2.0" |
71 | | -LABEL org.opencontainers.image.url "https://github.com/opencast/opencast-editor" |
72 | | -LABEL org.opencontainers.image.documentation "https://github.com/opencast/opencast-editor" |
73 | | -LABEL org.opencontainers.image.source "https://github.com/opencast/opencast-editor" |
| 25 | +COPY --from=build /src/build "/www/${PUBLIC_URL}" |
74 | 26 |
|
75 | | -ENTRYPOINT [ "/caddy" ] |
76 | | -CMD ["run", "--config", "/Caddyfile", "--adapter", "caddyfile"] |
| 27 | +LABEL maintainer="shio solutions GmbH <dev@shio.solutions>" \ |
| 28 | + org.opencontainers.image.title="Opencast Video Editor" \ |
| 29 | + org.opencontainers.image.description="Web-based video editor for Opencast" \ |
| 30 | + org.opencontainers.image.version="${VERSION}" \ |
| 31 | + org.opencontainers.image.vendor="shio solutions GmbH" \ |
| 32 | + org.opencontainers.image.authors="shio solutions GmbH <dev@shio.solutions>" \ |
| 33 | + org.opencontainers.image.licenses="Apache-2.0" \ |
| 34 | + org.opencontainers.image.url="https://github.com/tales-media/fork-opencast-opencast-editor" \ |
| 35 | + org.opencontainers.image.documentation="https://github.com/tales-media/fork-opencast-opencast-editor" \ |
| 36 | + org.opencontainers.image.source="https://github.com/tales-media/fork-opencast-opencast-editor" \ |
| 37 | + org.opencontainers.image.created="${BUILD_DATE}" \ |
| 38 | + org.opencontainers.image.revision="${GIT_COMMIT}" |
0 commit comments