-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathsteamcmd.dockerfile
executable file
·40 lines (31 loc) · 1 KB
/
steamcmd.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
#!/usr/bin/env -S docker -D build --compress -t pvtmert/steamcmd -f
ARG OS_RELEASE=stable
FROM debian:${OS_RELEASE}
ARG OS_RELEASE
RUN echo "deb http://deb.debian.org/debian ${OS_RELEASE} non-free" \
| tee -a /etc/apt/sources.list.d/non-free.list
RUN dpkg --add-architecture i386
RUN apt update
RUN yes 2 \
| apt install -y \
curl steamcmd
ENV PATH "/usr/games:$PATH:."
ENV GAME "/home"
RUN steamcmd \
+login anonymous \
+force_install_dir "${GAME}" \
+quit
ONBUILD RUN test -z "${APPID}" || steamcmd \
+login anonymous \
+force_install_dir "${GAME}" \
+app_update "${APPID}" \
+quit
RUN ( \
echo "#!/usr/bin/env bash -x --"; \
echo "steamcmd +login anonymous +force_install_dir "\${GAME}" +app_update "\${APPID}" +quit"; \
echo "for arg in \"\$@\"; do printf '%3d: %s\\\n' \"\$((++i))\" \"\${arg}\"; done;"; \
echo "cd \"\${GAME}\" && exec \"\$@\"; exit;"; \
) | tee /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT [ "bash", "-x", "--", "/entrypoint.sh" ]
CMD [ "steamcmd", "--help" ]