Advertisement
InnovativeStudios

Dockerfile

Jun 11th, 2023 (edited)
1,132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.48 KB | None | 0 0
  1. FROM ubuntu:latest
  2.  
  3. # Install dependencies
  4. RUN apt-get update && \
  5.     apt-get install -y --no-install-recommends --no-install-suggests \
  6.         software-properties-common \
  7.         wget \
  8.         ca-certificates \
  9.         lib32gcc-s1 \
  10.         lib32stdc++6 \
  11.         locales \
  12.         net-tools \
  13.         python3 \
  14.         python3-pip && \
  15.     rm -rf /var/lib/apt/lists/*
  16.  
  17. # Enable the en_US.UTF-8 locale
  18. RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
  19.     locale-gen
  20.  
  21. # Download and install SteamCMD
  22. RUN mkdir -p /steamcmd && \
  23.     wget -qO- 'https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz' | tar zxf - -C /steamcmd
  24.  
  25. # Install Python dependencies
  26. COPY requirements.txt .
  27. RUN pip3 install -r requirements.txt
  28.  
  29. # Docker environment values
  30. ENV ARMA_BINARY=./arma3server
  31. ENV ARMA_CONFIG=main.cfg
  32. ENV ARMA_PARAMS=
  33. ENV ARMA_PROFILE=main
  34. ENV ARMA_WORLD=empty
  35. ENV ARMA_LIMITFPS=1000
  36. ENV ARMA_CDLC=
  37. ENV HEADLESS_CLIENTS=0
  38. ENV HEADLESS_CLIENTS_PROFILE="\$profile-hc-\$i"
  39. ENV PORT=2302
  40. ENV STEAM_BRANCH=public
  41. ENV STEAM_BRANCH_PASSWORD=
  42. ENV MODS_LOCAL=true
  43. ENV MODS_PRESET=
  44. ENV SKIP_INSTALL=false
  45.  
  46. # Expose necessary ports
  47. EXPOSE 2302-2306/tcp
  48. EXPOSE 2302-2306/udp
  49.  
  50. # Set working directory
  51. WORKDIR /arma3
  52.  
  53. # Mount the steamcmd volume
  54. VOLUME /steamcmd
  55.  
  56. # Define the stop signal
  57. STOPSIGNAL SIGINT
  58.  
  59. # Copy the Python scripts to the container
  60. COPY *.py /
  61.  
  62. # Set the entrypoint to run the Python script
  63. CMD ["python3", "/launch.py"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement