-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
74 lines (55 loc) · 1.74 KB
/
Copy pathDockerfile
File metadata and controls
74 lines (55 loc) · 1.74 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# Builder image
FROM golang:1.15 as builder
RUN go get -v github.com/Didstopia/steamer
WORKDIR /go/src/github.com/Didstopia/steamer/
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o steamer .
#RUN steamer --appinfo 748090
# Primary image
FROM --platform=amd64 didstopia/base:steamcmd-ubuntu-24.04
LABEL maintainer="Didstopia <support@didstopia.com>"
# Fixes apt-get warnings
ARG DEBIAN_FRONTEND=noninteractive
# Install dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
net-tools \
jq \
cron \
libsdl2-2.0-0:i386 \
rsyslog && \
rm -rf /var/lib/apt/lists/*
# Create and set the steamcmd folder as a volume
RUN mkdir -p /steamcmd/colonysurvival
VOLUME ["/steamcmd/colonysurvival"]
# Add the steamcmd installation script
ADD install.txt /app/install.txt
# Copy any scripts
ADD start.sh /app/start.sh
ADD update.sh /app/update.sh
# Make sure they're executable
RUN chmod +x /app/*.sh
# Copy the compiled Go app
COPY --from=builder /go/src/github.com/Didstopia/steamer/steamer /usr/bin
# Add the crontab
ADD crontab /app/update.cron
# Set the current working directory
WORKDIR /
# Expose necessary ports
#EXPOSE 27004/tcp
#EXPOSE 27004/udp
EXPOSE 27016/tcp
EXPOSE 27016/udp
EXPOSE 27017/tcp
# Run as a non-root user by default
ENV PGID 1000
ENV PUID 1000
# Enable passwordless sudo
ENV ENABLE_PASSWORDLESS_SUDO "true"
# Setup default environment variables for the server
ENV SERVER_STARTUP_ARGS "-batchmode -nographics start_server +server.gameport 27016 +server.steamport 27017 +server.networktype SteamOnline +server.usevac true"
ENV SERVER_NAME "Docker"
ENV SERVER_PASSWORD ""
# Test that the Go app works
#RUN steamer --appinfo 748090
# Start the server
CMD [ "/bin/bash", "/app/start.sh"]