Create Dockerfile
Browse files- Dockerfile +29 -0
Dockerfile
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use a base image with necessary dependencies
|
| 2 |
+
FROM ubuntu:20.04
|
| 3 |
+
|
| 4 |
+
# Set environment variables to avoid user interaction during installation
|
| 5 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
| 6 |
+
|
| 7 |
+
# Update package list and install necessary dependencies
|
| 8 |
+
RUN apt-get update && apt-get install -y \
|
| 9 |
+
libglib2.0-0 \
|
| 10 |
+
libsm6 \
|
| 11 |
+
libxrender1 \
|
| 12 |
+
libxext6 \
|
| 13 |
+
xvfb \
|
| 14 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 15 |
+
|
| 16 |
+
# Create a directory for the server build
|
| 17 |
+
RUN mkdir /server
|
| 18 |
+
|
| 19 |
+
# Copy the server build files into the container
|
| 20 |
+
COPY ServerBuild /server
|
| 21 |
+
|
| 22 |
+
# Make the server executable executable
|
| 23 |
+
RUN chmod +x /server/ServerBuild.x86_64
|
| 24 |
+
|
| 25 |
+
# Expose port 7860 for communication
|
| 26 |
+
EXPOSE 7860
|
| 27 |
+
|
| 28 |
+
# Run the server build using xvfb-run to handle graphics (if needed)
|
| 29 |
+
CMD ["xvfb-run", "/server/ServerBuild.x86_64"]
|