Spaces:
Running
Running
Make sure directory is created in Docker
Browse files- Dockerfile +12 -3
Dockerfile
CHANGED
|
@@ -1,7 +1,16 @@
|
|
| 1 |
FROM nginx:alpine
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
|
|
|
|
|
|
| 5 |
COPY . /usr/share/nginx/html
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
EXPOSE 7860
|
| 7 |
CMD ["nginx", "-g", "daemon off;"]
|
|
|
|
| 1 |
FROM nginx:alpine
|
| 2 |
+
|
| 3 |
+
# Create the directory and set permissions first
|
| 4 |
+
RUN mkdir -p /usr/share/nginx/html && chmod -R 777 /usr/share/nginx/html
|
| 5 |
+
|
| 6 |
+
# Now copy your files
|
| 7 |
COPY . /usr/share/nginx/html
|
| 8 |
+
|
| 9 |
+
# Copy the config
|
| 10 |
+
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
| 11 |
+
|
| 12 |
+
# Fix permissions for Nginx internal folders (HF requirement)
|
| 13 |
+
RUN chmod -R 777 /var/cache/nginx /var/run /var/log/nginx /etc/nginx/conf.d
|
| 14 |
+
|
| 15 |
EXPOSE 7860
|
| 16 |
CMD ["nginx", "-g", "daemon off;"]
|