-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
79 lines (61 loc) · 2.39 KB
/
Copy pathDockerfile
File metadata and controls
79 lines (61 loc) · 2.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#Start from the latest ubuntu image
FROM ubuntu:20.04
#Install Apache2, PHP7.4, MariaDB, debconfutils and VIM
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y git libnss-sss nano apache2 php7.4 libapache2-mod-php vim \
&& apt-get install -y debconf-utils \
&& apt-get clean
RUN echo "phpmyadmin phpmyadmin/internal/skip-preseed boolean true" | debconf-set-selections
RUN echo "phpmyadmin phpmyadmin/reconfigure-webserver multiselect apache2" | debconf-set-selections
RUN echo "phpmyadmin phpmyadmin/mysql/admin-user string nobody" | debconf-set-selections
RUN echo "phpmyadmin phpmyadmin/mysql/admin-pass password password" | debconf-set-selections
RUN echo "phpmyadmin phpmyadmin/mysql/app-pass password password" |debconf-set-selections
RUN echo "phpmyadmin phpmyadmin/app-password-confirm password password" | debconf-set-selections
RUN echo "phpmyadmin phpmyadmin/dbconfig-install boolean false" | debconf-set-selections
RUN apt-get install -y -q phpmyadmin mariadb-server \
&& apt-get clean
WORKDIR /etc/apache2
COPY apache2.conf .
COPY envvars .
COPY ports.conf .
WORKDIR /etc/apache2/sites-available
COPY 000-default.conf .
#COPY default-ssl.conf .
WORKDIR /etc/phpmyadmin
COPY config.inc.php .
# WORKDIR /etc/mysql/
# RUN rm debian.cnf
# COPY debian.cnf .
# WORKDIR /etc/mysql/mariadb.conf.d
# RUN rm 50-server.cnf
# COPY 50-server.cnf .
# WORKDIR /etc/init.d
# RUN rm mysql
# COPY mysql .
# RUN echo yes
# VOLUME /var/lib/mysql
# RUN mkdir -p /var/run/mysqld /var/lib/mysql
# RUN usermod -d /var/lib/mysql/ nobody
# RUN find /var/lib/mysql -type f -exec touch {} \;
# RUN touch /var/run/mysqld/mysqld.sock
# RUN chmod -R 4777 /var/log/mysql /var/lib/mysql
# RUN chown -R nobody:nogroup /var/lib/mysql
# RUN chown -R nobody:nogroup /var/run/mysqld
# RUN chown -R nobody:nogroup /var/run/mysqld/mysqld.sock
CMD /bin/bash
ENTRYPOINT []
RUN ln -sf /usr/share/zoneinfo/America/Chicago /etc/localtime
RUN echo "America/Chicago" > /etc/timezone
RUN dpkg-reconfigure --frontend noninteractive tzdata
ENV DEBIAN_FRONTEND=noninteractive
RUN chmod -R 777 /var/lib/mysql /var/log/mysql /var/lib/phpmyadmin
RUN rm -fr /var/lib/mysql/mysql /var/lib/mysql/performance_schema
RUN apt-get install uuid-runtime
WORKDIR /app
COPY script.sh .
RUN chmod a+x script.sh
RUN chown -R 777 /app
#RUN a2enmod ssl
#EXPOSE 8081
#CMD ["apachectl", "-D", "FOREGROUND"]
#CMD ["/bin/bash", "/app/script.sh"]