-
-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathDockerfile
More file actions
23 lines (19 loc) · 652 Bytes
/
Dockerfile
File metadata and controls
23 lines (19 loc) · 652 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM nginx:alpine
# Copy the application files to the nginx html directory
COPY /src/*.* /usr/share/nginx/html/
COPY peerspace.png /usr/share/nginx/html/
# Add any other static assets like CSS files if they are separate
# Configure nginx to handle Single Page Application routing (good practice)
RUN echo 'server { \
listen 80; \
server_name localhost; \
root /usr/share/nginx/html; \
index index.html; \
location / { \
try_files $uri $uri/ /index.html; \
} \
}' > /etc/nginx/conf.d/default.conf
# Expose port 80 (nginx default)
EXPOSE 80
# Start nginx when the container launches
CMD ["nginx", "-g", "daemon off;"]