Update Dockerfile
Browse files- Dockerfile +7 -8
Dockerfile
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
# Use the official Ubuntu image as
|
| 2 |
FROM ubuntu:latest
|
| 3 |
|
| 4 |
# Install necessary packages
|
|
@@ -10,17 +10,16 @@ RUN apt-get update && \
|
|
| 10 |
&& apt-get clean \
|
| 11 |
&& rm -rf /var/lib/apt/lists/*
|
| 12 |
|
| 13 |
-
# Copy custom Nginx configuration if needed
|
| 14 |
-
# COPY nginx.conf /etc/nginx/nginx.conf
|
| 15 |
-
|
| 16 |
# Configure MariaDB
|
| 17 |
-
RUN
|
| 18 |
-
|
|
|
|
|
|
|
| 19 |
|
| 20 |
# Expose ports
|
| 21 |
EXPOSE 80 3306
|
| 22 |
|
| 23 |
-
# Start
|
| 24 |
CMD service mysql start && \
|
| 25 |
service nginx start && \
|
| 26 |
-
tail -f /
|
|
|
|
| 1 |
+
# Use the official Ubuntu image as a base
|
| 2 |
FROM ubuntu:latest
|
| 3 |
|
| 4 |
# Install necessary packages
|
|
|
|
| 10 |
&& apt-get clean \
|
| 11 |
&& rm -rf /var/lib/apt/lists/*
|
| 12 |
|
|
|
|
|
|
|
|
|
|
| 13 |
# Configure MariaDB
|
| 14 |
+
RUN sed -i 's/^bind-address/#bind-address/' /etc/mysql/mariadb.conf.d/50-server.cnf
|
| 15 |
+
|
| 16 |
+
# Configure Nginx
|
| 17 |
+
COPY nginx.conf /etc/nginx/nginx.conf
|
| 18 |
|
| 19 |
# Expose ports
|
| 20 |
EXPOSE 80 3306
|
| 21 |
|
| 22 |
+
# Start services and keep the container running
|
| 23 |
CMD service mysql start && \
|
| 24 |
service nginx start && \
|
| 25 |
+
tail -f /var/log/nginx/access.log -f /var/log/nginx/error.log
|