-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
27 lines (20 loc) · 915 Bytes
/
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
# Using openjdk as base image to support ARM builds
# FROM openjdk:8-alpine
FROM --platform=linux/amd64 amazoncorretto:8-alpine
ENV SFS_VERSION 2_19_0
ENV SFS_PATCH 2.19.1
RUN wget -q -O - https://www.smartfoxserver.com/downloads/sfs2x/SFS2X_unix_${SFS_VERSION}.tar.gz | tar -C /opt -xzvf - \
# Swap out the java included with SFS with distro java
# This allows for ARM builds.
&& rm -rf /opt/SmartFoxServer_2X/jre \
&& ln -s /usr/lib/jvm/default-jvm/jre /opt/SmartFoxServer_2X/jre
WORKDIR /opt/SmartFoxServer_2X
RUN wget -q https://www.smartfoxserver.com/downloads/sfs2x/patches/SFS2X-Patch-${SFS_PATCH}.zip \
&& unzip SFS2X-Patch-${SFS_PATCH}.zip \
&& cd SFS2X-Patch-${SFS_PATCH} \
&& ./install-linux.sh \
&& cd .. \
&& rm -rf SFS2X-Patch-${SFS_UPDATE}.zip SFS2X-Patch-${SFS_PATCH}
EXPOSE 8080 8443 9933 5000
WORKDIR /opt/SmartFoxServer_2X/SFS2X
CMD ["sh", "sfs2x.sh"]