clone3 commited on
Commit
282c100
·
verified ·
1 Parent(s): 111b0e1

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -7
Dockerfile CHANGED
@@ -1,8 +1,14 @@
1
- FROM nginx:alpine
2
 
3
- # Install necessary packages for the backend server
4
- RUN apk update && \
5
- apk add --no-cache xvfb libxcursor bash
 
 
 
 
 
 
6
 
7
  # Copy backend server files and set permissions
8
  COPY build/ /app/build/
@@ -14,9 +20,9 @@ COPY html-page /usr/share/nginx/html-page
14
  # Set permissions for directories and files
15
  RUN chmod +x /app/build/tanks.x86_64 && \
16
  mkdir -p /app/logs && \
17
- mkdir -p /var/log/nginx /var/lib/nginx /var/lib/nginx/body && \
18
- chown -R nginx:nginx /app /usr/share/nginx/html /usr/share/nginx/html-page /var/log/nginx /var/lib/nginx && \
19
- chmod 755 /var/log/nginx /var/lib/nginx /var/lib/nginx/body
20
 
21
  # Copy and configure custom entrypoint script
22
  COPY entrypoint.sh /entrypoint.sh
 
1
+ FROM ubuntu:bionic
2
 
3
+ # Install necessary packages including xvfb and Nginx
4
+ RUN apt-get update && \
5
+ apt-get install -y \
6
+ xvfb \
7
+ nginx \
8
+ libxcursor1 \
9
+ bash && \
10
+ apt-get clean && \
11
+ rm -rf /var/lib/apt/lists/*
12
 
13
  # Copy backend server files and set permissions
14
  COPY build/ /app/build/
 
20
  # Set permissions for directories and files
21
  RUN chmod +x /app/build/tanks.x86_64 && \
22
  mkdir -p /app/logs && \
23
+ mkdir -p /var/log/nginx /var/lib/nginx /var/cache/nginx /var/lib/nginx/body && \
24
+ chown -R www-data:www-data /app /usr/share/nginx/html /usr/share/nginx/html-page /var/log/nginx /var/lib/nginx /var/cache/nginx && \
25
+ chmod 755 /var/log/nginx /var/lib/nginx /var/cache/nginx /var/lib/nginx/body
26
 
27
  # Copy and configure custom entrypoint script
28
  COPY entrypoint.sh /entrypoint.sh