clone3 commited on
Commit
8c13eae
·
verified ·
1 Parent(s): d79e800

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -7
Dockerfile CHANGED
@@ -1,6 +1,6 @@
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 \
@@ -10,16 +10,18 @@ RUN apt-get update && \
10
  apt-get clean && \
11
  rm -rf /var/lib/apt/lists/*
12
 
13
- # Create application directories
14
- RUN mkdir -p /app /app/build /var/log/nginx /var/lib/nginx /var/cache/nginx /usr/share/nginx/html /usr/share/nginx/html-page
 
15
 
16
- # Set ownership and permissions for Nginx directories
17
- RUN chown -R www-data:www-data /var/log/nginx /var/lib/nginx /var/cache/nginx /usr/share/nginx/html /usr/share/nginx/html-page
18
-
19
- # Copy backend server files and set permissions
20
  COPY build/ /app/build/
 
 
21
  COPY etc/nginx/nginx.conf /etc/nginx/nginx.conf
22
  COPY etc/nginx/conf.d /etc/nginx/conf.d
 
 
23
  COPY webgl-build /usr/share/nginx/html
24
  COPY html-page /usr/share/nginx/html-page
25
 
 
1
  FROM ubuntu:bionic
2
 
3
+ # Install necessary packages including Nginx and xvfb
4
  RUN apt-get update && \
5
  apt-get install -y \
6
  xvfb \
 
10
  apt-get clean && \
11
  rm -rf /var/lib/apt/lists/*
12
 
13
+ # Create necessary directories with appropriate permissions
14
+ RUN mkdir -p /app/build /var/log/nginx /var/lib/nginx /var/cache/nginx /usr/share/nginx/html /usr/share/nginx/html-page && \
15
+ chown -R www-data:www-data /var/log/nginx /var/lib/nginx /var/cache/nginx /usr/share/nginx/html /usr/share/nginx/html-page
16
 
17
+ # Copy backend server files
 
 
 
18
  COPY build/ /app/build/
19
+
20
+ # Copy Nginx configuration files
21
  COPY etc/nginx/nginx.conf /etc/nginx/nginx.conf
22
  COPY etc/nginx/conf.d /etc/nginx/conf.d
23
+
24
+ # Copy webgl build and HTML page
25
  COPY webgl-build /usr/share/nginx/html
26
  COPY html-page /usr/share/nginx/html-page
27