-
Notifications
You must be signed in to change notification settings - Fork 55
/
Dockerfile
54 lines (35 loc) · 1.53 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
FROM golang:1-bookworm AS builder
ARG VERSION=docker
ENV NODE_MAJOR=16
RUN apt-get update && apt-get install -y ca-certificates curl gnupg
RUN mkdir -p /etc/apt/keyrings
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get install -y git build-essential nodejs="${NODE_MAJOR}.*" zip
WORKDIR /accweb_src
COPY . /accweb_src
# RUN rm public/dist/*
RUN sh build/build_release.sh ${VERSION}
RUN cd /accweb_src/releases && unzip accweb_${VERSION}.zip && mv accweb_${VERSION} /accweb
FROM alpine:3.18
LABEL description="Assetto Corsa Competizione Server Management Tool via Web Interface."
ARG VERSION=noversion
RUN apk add --no-cache gettext wine ca-certificates
RUN mkdir /accserver && mkdir /accweb
COPY --from=builder /accweb/accweb /accweb/accweb
COPY --from=builder /accweb_src/build/docker/* /accweb/
ENV ACCWEB_HOST=0.0.0.0:8080 \
ACCWEB_ENABLE_TLS=false \
ACCWEB_CERT_FILE=/sslcerts/certificate.crt \
ACCWEB_PRIV_FILE=/sslcerts/private.key \
ACCWEB_ADMIN_PASSWORD=weakadminpassword \
ACCWEB_MOD_PASSWORD=weakmodpassword \
ACCWEB_RO_PASSWORD=weakropassword \
ACCWEB_LOGLEVEL=info \
ACCWEB_CORS=*
VOLUME /accserver /accweb /sslcerts
WORKDIR /accweb
EXPOSE 8080
ENTRYPOINT [ "sh", "/accweb/docker-entrypoint.sh" ]
CMD [ "start" ]