2024-07-02 04:56:11 +00:00
|
|
|
### 1. Linux
|
|
|
|
FROM alpine:3.20.1
|
2024-06-25 20:46:03 +00:00
|
|
|
LABEL authors="hapso"
|
|
|
|
WORKDIR /app
|
|
|
|
COPY . /app
|
2024-07-02 04:56:11 +00:00
|
|
|
### 2. Java
|
|
|
|
RUN apk update \
|
|
|
|
&& apk upgrade \
|
|
|
|
&& apk add --no-cache bash \
|
|
|
|
&& apk add --no-cache unzip \
|
|
|
|
&& apk add --no-cache curl \
|
|
|
|
&& apk add --no-cache openjdk21-jre
|
|
|
|
### 3. Python, PIP
|
|
|
|
RUN apk add --no-cache python3 \
|
|
|
|
&& apk add py3-pip \
|
|
|
|
&& pip3 install --no-cache-dir -r requirements.txt --break-system-packages
|
|
|
|
#### 4. SET JAVA_HOME environment variable (OPTIONAL)
|
|
|
|
ENV JAVA_HOME="/usr/lib/jvm/java-21-openjdk"
|
|
|
|
### 5. Launch !
|
2024-06-25 20:46:03 +00:00
|
|
|
EXPOSE 3000/tcp
|
|
|
|
EXPOSE 3000/udp
|
2024-07-02 04:56:11 +00:00
|
|
|
EXPOSE 3500-25565/tcp
|
|
|
|
EXPOSE 3500-25565/udp
|
2024-06-25 20:46:03 +00:00
|
|
|
CMD ["python3", "app.py"]
|