Minor refactor and cleanup
This commit is contained in:
+5
-5
@@ -2,12 +2,12 @@ FROM php:7.4.21-apache
|
|||||||
ENV APP_VERSION=1.0.0
|
ENV APP_VERSION=1.0.0
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y less nano tini curl tar git zip unzip && \
|
apt-get install -y --no-install-recommends less nano tini curl tar git zip unzip && \
|
||||||
#echo "**** # To install networking tools for testing purpose ****" && \
|
#echo "**** # To install networking tools for testing purpose ****" && \
|
||||||
apt-get install -y iputils-ping dnsutils net-tools procps
|
apt-get install -y --no-install-recommends iputils-ping dnsutils net-tools procps && \
|
||||||
#echo "**** cleanup ****" && \
|
#echo "**** cleanup ****" && \
|
||||||
#apt-get autoremove -y && \
|
apt-get autoremove -y && \
|
||||||
#apt-get clean -y
|
apt-get clean -y
|
||||||
|
|
||||||
# curl -SL -o app.tar.gz "https://github.com/giandonatoinverso/PHP-Dynamic-Qr-code/archive/${APP_VERSION}.tar.gz" \
|
# curl -SL -o app.tar.gz "https://github.com/giandonatoinverso/PHP-Dynamic-Qr-code/archive/${APP_VERSION}.tar.gz" \
|
||||||
RUN curl -SL -o app.tar.gz "https://github.com/giandonatoinverso/PHP-Dynamic-Qr-code/archive/refs/heads/master.tar.gz" \
|
RUN curl -SL -o app.tar.gz "https://github.com/giandonatoinverso/PHP-Dynamic-Qr-code/archive/refs/heads/master.tar.gz" \
|
||||||
@@ -17,7 +17,7 @@ RUN curl -SL -o app.tar.gz "https://github.com/giandonatoinverso/PHP-Dynamic-Qr-
|
|||||||
&& rm app.tar.gz
|
&& rm app.tar.gz
|
||||||
|
|
||||||
RUN apt-get update
|
RUN apt-get update
|
||||||
RUN apt-get install -y libzip-dev libjpeg62-turbo-dev libpng-dev libfreetype6-dev
|
RUN apt-get install -y --no-install-recommends libzip-dev libjpeg62-turbo-dev libpng-dev libfreetype6-dev
|
||||||
|
|
||||||
# install composer
|
# install composer
|
||||||
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
|
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
|
||||||
|
|||||||
+12
-9
@@ -1,27 +1,30 @@
|
|||||||
### How to run this image
|
### How to run this image
|
||||||
|
|
||||||
- currently this image must be build locally.(in future can be pulled from docker hub)
|
- currently this image must be build locally.(in future can be pulled from docker hub)
|
||||||
- create folder to mount inside docker container
|
- create folder to mount inside docker container
|
||||||
- `mkdir -p ./data/mariadb ./data/app/config ./data/app/saved_qrcode`
|
- `mkdir -p ./data/mariadb ./data/app/config ./data/app/saved_qrcode`
|
||||||
- Run and build this image as host machine user
|
- Run and build this image as host machine user
|
||||||
- `PUID="$(id -u)" PGID="$(id -g)" docker-compose up --build -d`
|
- `PUID="$(id -u)" PGID="$(id -g)" docker-compose up --build -d`
|
||||||
- Run and build this image as specific user
|
- Run and build this image as specific user
|
||||||
- `PUID="1000" PGID="1000" docker-compose up --build -d`
|
- `PUID="1000" PGID="1000" docker-compose up --build -d`
|
||||||
- Run app installation <IP>:8080/install
|
- Run app installation <IP>:8080/install
|
||||||
- Provide Database credentials
|
- Provide Database credentials
|
||||||
- Default login: <IP>:8080
|
- Default login: <IP>:8080
|
||||||
- user: superadmin
|
- user: superadmin
|
||||||
- password: superadmin
|
- password: superadmin
|
||||||
|
|
||||||
### Roadmap
|
### Roadmap
|
||||||
|
|
||||||
- Make install process run via docker-compose.
|
- Make install process run via docker-compose.
|
||||||
- Work is partially done. docker-entrypoint.sh is created.(currently disabled due to next steps are pending)
|
- Work is partially done. docker-entrypoint.sh is created.(currently disabled due to next steps are pending)
|
||||||
- qrcode/install/database.php should be adjusted to create database without form submission.
|
- qrcode/install/database.php should be adjusted to create database without form submission.
|
||||||
- Make it possible to set PUID and GUID, from environment variable in docker-compose.yml .
|
- Make it possible to set PUID and GUID, from environment variable in docker-compose.yml .
|
||||||
- Reduce image size by removing unnecessary dependencies.
|
- Reduce image size by removing unnecessary dependencies.
|
||||||
- Automate Build image and push to docker hub.
|
- Automate Build image and push to docker hub.
|
||||||
- Audit security flaws and fix it if needed.
|
- Audit security flaws and fix it if needed.
|
||||||
|
|
||||||
### some debug commands
|
### Some debug commands
|
||||||
|
|
||||||
- `docker-compose logs`
|
- `docker-compose logs`
|
||||||
- `PUID="$(id -u)" PGID="$(id -g)" docker-compose config`
|
- `PUID="$(id -u)" PGID="$(id -g)" docker-compose config`
|
||||||
- `ps -aef | grep apache2`
|
- `ps -aef | grep apache2`
|
||||||
Reference in New Issue
Block a user