Skip to content

Commit 3b22152

Browse files
committed
feat: Refine the image
* Use latest fedora instead of centos as centos is dead :( * Install the newest map pack from AIArena. * Run SC2 under unprivileged user for security. * Reduce count of intermediate volumes and do additional cleanup. * Move port option to CMD to support usage of different port. Signed-off-by: Alexander Kurbatov <[email protected]>
1 parent ca7c91c commit 3b22152

File tree

1 file changed

+19
-10
lines changed

1 file changed

+19
-10
lines changed

Dockerfile

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,27 @@
1-
FROM centos:8
1+
FROM fedora:36
22

3-
WORKDIR /StarCraftII
3+
LABEL maintainer="[email protected]"
44

5-
RUN yum install -y unzip wget
5+
WORKDIR /StarCraftII
66

7-
RUN wget -q 'http://blzdistsc2-a.akamaihd.net/Linux/SC2.4.10.zip' \
7+
RUN dnf install -y unzip wget \
8+
&& wget -q http://blzdistsc2-a.akamaihd.net/Linux/SC2.4.10.zip \
89
&& unzip -qq -P iagreetotheeula SC2.4.10.zip -d / \
910
&& rm SC2.4.10.zip
1011

11-
RUN mkdir /StarCraftII/maps
12-
RUN wget -q "https://drive.google.com/uc?export=download&id=1OzKPcqPaqLFmSzt5I7QcNCuIwnoSKCr2" -O 2020S2LadderMaps.zip \
13-
&& unzip -qq 2020S2LadderMaps.zip -d /StarCraftII/maps/2020S2 \
14-
&& rm 2020S2LadderMaps.zip
12+
RUN mkdir maps \
13+
&& wget -q -O sc2ai_2022_season3.zip https://aiarena.net/wiki/184/plugin/attachments/download/14/ \
14+
&& unzip -qq sc2ai_2022_season3.zip -d maps/ \
15+
&& rm sc2ai_2022_season3.zip
16+
17+
RUN groupadd --system --gid 202 sc2 \
18+
&& useradd --system --gid 202 --no-create-home --uid 202 sc2 \
19+
&& chown -R sc2:sc2 /StarCraftII \
20+
&& dnf erase -y unzip wget \
21+
&& dnf clean all \
22+
&& rm -rf /var/cache/yum
1523

16-
EXPOSE 8167
24+
USER sc2
1725

18-
ENTRYPOINT ["./Versions/Base75689/SC2_x64", "-listen", "0.0.0.0", "-port", "8167"]
26+
ENTRYPOINT ["./Versions/Base75689/SC2_x64", "-listen", "0.0.0.0"]
27+
CMD ["-port", "8167"]

0 commit comments

Comments
 (0)