stat-utas commited on
Commit
142afb4
·
verified ·
1 Parent(s): f3e2c81

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -8
Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- # Use the official Ubuntu image as the base
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 echo "[mysqld]" > /etc/mysql/my.cnf && \
18
- echo "bind-address = 0.0.0.0" >> /etc/mysql/my.cnf
 
 
19
 
20
  # Expose ports
21
  EXPOSE 80 3306
22
 
23
- # Start both MariaDB and Nginx
24
  CMD service mysql start && \
25
  service nginx start && \
26
- tail -f /dev/null
 
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