forked from assetto-corsa-web/accweb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
47 lines (33 loc) · 1.34 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
FROM golang AS build
LABEL maintainer="Kugel" \
contributors="GillesDubois" \
version="latest" \
description="Assetto Corsa Competizione Server Management Tool via Web Interface."
COPY . /go/src/github.com/assetto-corsa-web/accweb
WORKDIR /go/src/github.com/assetto-corsa-web/accweb
RUN apt update && \
apt upgrade -y && \
apt install curl -y
RUN curl -sL https://deb.nodesource.com/setup_13.x -o nodesource_setup.sh && bash nodesource_setup.sh
RUN apt-get install -y nodejs
ENV GOPATH=/go
RUN go build -tags netgo -a -v -ldflags "-s -w" main.go
RUN ./gen_rsa_keys.sh
RUN cd /go/src/github.com/assetto-corsa-web/accweb/public && npm i && npm rebuild node-sass && npm run build
# Final image
FROM ubuntu:bionic
COPY --from=build /go/src/github.com/assetto-corsa-web/accweb /accweb
ENV ACCWEB_HOST=localhost: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
RUN apt -y update && apt -y install gettext-base wine64-development wine-development libwine-development libwine-development-dev
EXPOSE 8080
ENTRYPOINT [ "/bin/sh", "-c", "/accweb/docker-entrypoint.sh" ]