Add: Entrypoint and change password edit on entrypoint.sh
This commit is contained in:
parent
a7ce35dcd0
commit
9ca109740a
19
Dockerfile
19
Dockerfile
@ -1,11 +1,5 @@
|
||||
FROM debian:bullseye-slim
|
||||
|
||||
ARG PASSWORD
|
||||
|
||||
ENV PASSWORD $PASSWORD
|
||||
|
||||
RUN echo $PASSWORD
|
||||
|
||||
RUN apt update && apt -y upgrade
|
||||
|
||||
RUN apt -y install apt-transport-https lsb-release ca-certificates curl gnupg && \
|
||||
@ -25,19 +19,10 @@ RUN rm -rf /var/www/html/*
|
||||
|
||||
COPY data/ /var/www/html/
|
||||
|
||||
RUN sed -i "s/1234567890/$PASSWORD/" /var/www/html/inc/conexion.php
|
||||
|
||||
RUN chown -R www-data:www-data /var/www/
|
||||
|
||||
#COPY config/default.conf /etc/apache2/sites-available/000-default.conf
|
||||
|
||||
#ENTRYPOINT ["/usr/sbin/apache2", "-k", "start"]
|
||||
|
||||
#ENV APACHE_RUN_USER www-data
|
||||
#ENV APACHE_RUN_GROUP www-data
|
||||
#ENV APACHE_LOG_DIR /var/log/apache2
|
||||
ADD entrypoint.sh /entrypoint.sh
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
CMD apachectl -D FOREGROUND
|
||||
|
||||
ENTRYPOINT /entrypoint.sh
|
||||
|
@ -11,11 +11,9 @@ services:
|
||||
- ./config/schema.sql:/docker-entrypoint-initdb.d/schema.sql:ro
|
||||
apache:
|
||||
image: registry.audio-lab.org/loreakazmatzen:1.0
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
- PASSWORD=${MYSQL_PASSWORD}
|
||||
environment:
|
||||
- PASSWORD
|
||||
build: .
|
||||
ports:
|
||||
- ${APACHE_PORT}:80
|
||||
|
||||
|
5
entrypoint.sh
Executable file
5
entrypoint.sh
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
sed -i "s/1234567890/$PASSWORD/" /var/www/html/inc/conexion.php
|
||||
|
||||
exec apachectl -D FOREGROUND $@
|
Loading…
Reference in New Issue
Block a user