-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
35 lines (22 loc) · 873 Bytes
/
Dockerfile
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
FROM bitnami/minideb:bullseye AS builder
ENV UTS_SERVER_TAG 0.2.1
ENV UTS_SERVER_DOWNLOAD_URL https://codeload.github.com/kakwa/uts-server/tar.gz/refs/tags/$UTS_SERVER_TAG
WORKDIR /root/uts-server
RUN install_packages \
ca-certificates curl libssl-dev cmake libcivetweb-dev gcc g++ make
RUN curl $UTS_SERVER_DOWNLOAD_URL -o uts-server-$UTS_SERVER_TAG.tar.gz \
&& tar --strip-components=1 -zxvf uts-server-$UTS_SERVER_TAG.tar.gz
RUN cmake . \
&& make
FROM bitnami/minideb:bullseye AS runner
WORKDIR /opt/uts-server
RUN install_packages \
ca-certificates libcivetweb-dev
RUN groupadd -r uts-server \
&& useradd -r -g uts-server uts-server \
&& mkdir /etc/uts-server \
&& chown uts-server:uts-server /etc/uts-server
VOLUME /etc/uts-server
COPY --from=builder /root/uts-server .
EXPOSE 2020
ENTRYPOINT ["./uts-server"]