anotherDocker / Dockerfile
clone3's picture
Update Dockerfile
b9df4f3 verified
raw
history blame
1.03 kB
FROM nginx:alpine
# Install necessary packages for the backend server
RUN apk update && \
apk add --no-cache xvfb libxcursor bash
# Copy backend server files and set permissions
COPY build/ /app/build/
COPY etc/nginx/nginx.conf /etc/nginx/nginx.conf
COPY etc/nginx/conf.d /etc/nginx/conf.d
COPY webgl-build /usr/share/nginx/html
COPY html-page /usr/share/nginx/html-page
# Set permissions for directories and files
RUN chmod +x /app/build/tanks.x86_64 && \
mkdir -p /app/logs && \
mkdir -p /var/log/nginx /var/lib/nginx /var/lib/nginx/body && \
chown -R nginx:nginx /app /usr/share/nginx/html /usr/share/nginx/html-page /var/log/nginx /var/lib/nginx && \
chmod 755 /var/log/nginx /var/lib/nginx /var/lib/nginx/body
# Copy and configure custom entrypoint script
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# Set workdir
WORKDIR /app/
# Expose necessary ports
EXPOSE 80 7777/udp 7778/tcp 7860
# Set the entrypoint to start the backend server and Nginx
ENTRYPOINT ["/entrypoint.sh"]