Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +4 -6
Dockerfile
CHANGED
|
@@ -1,6 +1,5 @@
|
|
| 1 |
FROM ubuntu:22.04
|
| 2 |
|
| 3 |
-
# Prevent interactive prompts during installation
|
| 4 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 5 |
|
| 6 |
# Install Nginx, PHP 8.1, and MariaDB
|
|
@@ -12,16 +11,15 @@ RUN apt-get update && apt-get install -y \
|
|
| 12 |
mariadb-server \
|
| 13 |
&& rm -rf /var/lib/apt/lists/*
|
| 14 |
|
|
|
|
|
|
|
|
|
|
| 15 |
# Copy configuration and startup scripts
|
| 16 |
COPY nginx.conf /etc/nginx/sites-available/default
|
| 17 |
COPY start.sh /start.sh
|
| 18 |
RUN chmod +x /start.sh
|
| 19 |
|
| 20 |
-
#
|
| 21 |
-
RUN mkdir -p /var/www/html && chown -R www-data:www-data /var/www/html
|
| 22 |
-
|
| 23 |
-
# Hugging Face requires port 7860
|
| 24 |
EXPOSE 7860
|
| 25 |
|
| 26 |
-
# Run the startup script
|
| 27 |
CMD ["/start.sh"]
|
|
|
|
| 1 |
FROM ubuntu:22.04
|
| 2 |
|
|
|
|
| 3 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 4 |
|
| 5 |
# Install Nginx, PHP 8.1, and MariaDB
|
|
|
|
| 11 |
mariadb-server \
|
| 12 |
&& rm -rf /var/lib/apt/lists/*
|
| 13 |
|
| 14 |
+
# Set working directory to where Hugging Face puts repository files
|
| 15 |
+
WORKDIR /app
|
| 16 |
+
|
| 17 |
# Copy configuration and startup scripts
|
| 18 |
COPY nginx.conf /etc/nginx/sites-available/default
|
| 19 |
COPY start.sh /start.sh
|
| 20 |
RUN chmod +x /start.sh
|
| 21 |
|
| 22 |
+
# Expose port 7860
|
|
|
|
|
|
|
|
|
|
| 23 |
EXPOSE 7860
|
| 24 |
|
|
|
|
| 25 |
CMD ["/start.sh"]
|