Spaces:
Build error
Build error
Commit
·
0e5e48d
1
Parent(s):
3842e59
reorder
Browse files- Dockerfile +22 -17
Dockerfile
CHANGED
@@ -1,43 +1,48 @@
|
|
1 |
FROM debian:12.6
|
2 |
-
|
3 |
-
|
4 |
-
RUN apt -y install apache2 php
|
5 |
-
RUN apt install -y sudo
|
6 |
ENV APACHE_RUN_USER www-data
|
7 |
ENV APACHE_RUN_GROUP www-data
|
8 |
ENV APACHE_LOG_DIR /app/log/apache2
|
9 |
|
10 |
-
|
11 |
-
RUN
|
|
|
|
|
|
|
12 |
RUN apt install -y lsof
|
13 |
-
RUN
|
14 |
-
RUN usermod -aG root root
|
15 |
-
RUN chown -R www-data:www-data /var/log/apache2
|
16 |
-
RUN mkdir -p etc/systemd/system/
|
17 |
|
18 |
-
COPY app/ app/
|
19 |
RUN touch /app/phpd.log
|
20 |
RUN chmod 777 /app/phpd.log
|
21 |
RUN chmod 777 /var/log/apache2/error.log
|
22 |
|
23 |
-
|
|
|
|
|
24 |
RUN usermod -aG adm root
|
|
|
|
|
|
|
|
|
25 |
|
26 |
-
RUN apt install -y libc6
|
27 |
RUN echo ${APACHE_LOG_DIR}
|
28 |
-
ENV TERM xterm
|
29 |
|
30 |
RUN adduser --disabled-password --gecos '' admin
|
31 |
RUN adduser admin sudo
|
32 |
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
33 |
|
34 |
|
35 |
-
RUN chown admin:admin /var/log/apache2/error.log
|
36 |
-
RUN chmod 777 /var/log/apache2/error.log
|
37 |
RUN chown admin:admin /app
|
38 |
RUN chmod 777 /app
|
|
|
|
|
|
|
39 |
USER admin
|
40 |
|
41 |
-
|
|
|
42 |
|
43 |
CMD [ "/bin/bash","-c", "echo ${APACHE_LOG_DIR}; cat /etc/passwd; sudo cat /var/log/apache2/error.log; ls -la /var/log/apache2/error.log; pwd; id; whoami; lsof -i:7860; service apache2 start; echo puertos 2; lsof -i:7860; touch phpd.log; php -S 0.0.0.0:7860 > phpd.log 2>&1 & echo puertos 3; lsof -i:7860; echo fin; echo este es el puerto $(lsof -i:7860); tail -F error.log" ]
|
|
|
1 |
FROM debian:12.6
|
2 |
+
|
3 |
+
ENV TERM xterm
|
|
|
|
|
4 |
ENV APACHE_RUN_USER www-data
|
5 |
ENV APACHE_RUN_GROUP www-data
|
6 |
ENV APACHE_LOG_DIR /app/log/apache2
|
7 |
|
8 |
+
RUN apt -y update
|
9 |
+
RUN apt -y upgrade
|
10 |
+
COPY --chown=admin:admin error.log /var/log/apache2/error.log
|
11 |
+
RUN apt -y install apache2 php
|
12 |
+
RUN apt install -y sudo
|
13 |
RUN apt install -y lsof
|
14 |
+
RUN apt install -y libc6
|
|
|
|
|
|
|
15 |
|
16 |
+
COPY ./app/ /app/
|
17 |
RUN touch /app/phpd.log
|
18 |
RUN chmod 777 /app/phpd.log
|
19 |
RUN chmod 777 /var/log/apache2/error.log
|
20 |
|
21 |
+
|
22 |
+
EXPOSE 7860
|
23 |
+
RUN usermod -aG root root
|
24 |
RUN usermod -aG adm root
|
25 |
+
#RUN chown -R www-data:www-data /var/log/apache2
|
26 |
+
|
27 |
+
|
28 |
+
WORKDIR /app
|
29 |
|
|
|
30 |
RUN echo ${APACHE_LOG_DIR}
|
|
|
31 |
|
32 |
RUN adduser --disabled-password --gecos '' admin
|
33 |
RUN adduser admin sudo
|
34 |
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
35 |
|
36 |
|
37 |
+
#RUN chown admin:admin /var/log/apache2/error.log
|
|
|
38 |
RUN chown admin:admin /app
|
39 |
RUN chmod 777 /app
|
40 |
+
|
41 |
+
RUN sed -i 's/Listen 80/Listen 7860/g' /etc/apache2/ports.conf
|
42 |
+
RUN service apache2 start
|
43 |
USER admin
|
44 |
|
45 |
+
RUN ls -la /var/log/apache2/error.log
|
46 |
+
RUN chmod 777 /var/log/apache2/error.log
|
47 |
|
48 |
CMD [ "/bin/bash","-c", "echo ${APACHE_LOG_DIR}; cat /etc/passwd; sudo cat /var/log/apache2/error.log; ls -la /var/log/apache2/error.log; pwd; id; whoami; lsof -i:7860; service apache2 start; echo puertos 2; lsof -i:7860; touch phpd.log; php -S 0.0.0.0:7860 > phpd.log 2>&1 & echo puertos 3; lsof -i:7860; echo fin; echo este es el puerto $(lsof -i:7860); tail -F error.log" ]
|