forked from coroot/coroot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdev.dockerfile
More file actions
45 lines (34 loc) · 994 Bytes
/
dev.dockerfile
File metadata and controls
45 lines (34 loc) · 994 Bytes
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
FROM node:21 AS frontend-builder
WORKDIR /tmp/src
COPY . .
WORKDIR /tmp/src/front
RUN npm ci
RUN npm run build-prod
FROM golang:1.23-bullseye AS backend-builder
ARG VERSION=unknown
RUN apt update && apt install -y liblz4-dev
WORKDIR /tmp/src
COPY go.mod .
COPY go.sum .
RUN go mod download
COPY . .
WORKDIR /tmp/src/static
COPY --from=frontend-builder /tmp/src/static /tmp/src/static
WORKDIR /tmp/src
RUN go build -mod=readonly -ldflags "-X main.version=$VERSION" -o coroot .
FROM registry.access.redhat.com/ubi9/ubi
ARG VERSION=unknown
LABEL name="coroot" \
vendor="Coroot, Inc." \
maintainer="Coroot, Inc." \
version=${VERSION} \
release="1" \
summary="Coroot Community Edition." \
description="Coroot Community Edition container image."
COPY LICENSE /licenses/LICENSE
COPY --from=backend-builder /tmp/src/coroot /usr/bin/coroot
RUN mkdir /data && chown 65534:65534 /data
USER 65534:65534
VOLUME /data
EXPOSE 8080
ENTRYPOINT ["/usr/bin/coroot"]