forked from steamcmd/docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
54 lines (40 loc) · 1.29 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
######## BUILDER ########
# Set the base image
FROM steamcmd/steamcmd:ubuntu-18 as builder
# Set environment variables
ENV USER root
ENV HOME /root/installer
# Set working directory
WORKDIR $HOME
# Install prerequisites
RUN apt-get update \
&& apt-get install -y --no-install-recommends curl tar
# Donload and unpack installer
RUN curl http://media.steampowered.com/installer/steamcmd_linux.tar.gz \
--output steamcmd.tar.gz --silent
RUN tar -xvzf steamcmd.tar.gz && rm steamcmd.tar.gz
######## INSTALL ########
# Set the base image
FROM alpine:3
# Set environment variables
ENV USER root
ENV HOME /root
# Set working directory
WORKDIR $HOME
# Install prerequisites
RUN apk update \
&& apk add --no-cache bash \
&& rm -rf /var/cache/apk/*
# Copy steamcmd files from builder
COPY --from=builder /root/installer/steamcmd.sh /usr/lib/games/steam/
COPY --from=builder /root/installer/linux32/steamcmd /usr/lib/games/steam/
COPY --from=builder /usr/games/steamcmd /usr/bin/steamcmd
# Copy required files from builder
COPY --from=builder /etc/ssl/certs /etc/ssl/certs
COPY --from=builder /lib/i386-linux-gnu /lib/
COPY --from=builder /root/installer/linux32/libstdc++.so.6 /lib/
# Update SteamCMD and verify latest version
RUN steamcmd +quit
# Set default command
ENTRYPOINT ["steamcmd"]
CMD ["+help", "+quit"]