mirror of
https://github.com/DerTyp7/docker_minecraft_server_auto_starter.git
synced 2025-10-29 12:42:09 +01:00
Add Docker installation and update CMD command
This commit is contained in:
16
Dockerfile
16
Dockerfile
@@ -5,7 +5,19 @@ ENV PORT_IP_MAP ""
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
|
||||
# Install Python and pip
|
||||
RUN apt-get update && apt-get install -y python3 python3-pip python3-venv
|
||||
RUN apt-get update && apt-get install -y python3 python3-pip python3-venv
|
||||
|
||||
# Install Docker
|
||||
RUN apt-get update && apt-get install -y \
|
||||
apt-transport-https \
|
||||
ca-certificates \
|
||||
curl \
|
||||
gnupg \
|
||||
lsb-release && \
|
||||
curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - && \
|
||||
echo "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" > /etc/apt/sources.list.d/docker.list && \
|
||||
apt-get update && \
|
||||
apt-get install -y docker-ce docker-ce-cli containerd.io
|
||||
|
||||
# Create a virtual environment and activate it
|
||||
RUN python3 -m venv /app/venv
|
||||
@@ -25,4 +37,4 @@ RUN pip install -r requirements.txt
|
||||
EXPOSE 80
|
||||
|
||||
# Start Nginx and run the Python app
|
||||
CMD service nginx start && exec python app.py
|
||||
CMD docker compose up -d --remove-orphans && service nginx start && exec python app.py
|
||||
Reference in New Issue
Block a user