cleaned up docker related files
This commit is contained in:
parent
3d290e2bb6
commit
84ffbf88b6
@ -30,6 +30,7 @@ RUN sed -ri -e 's|^database_hostname[[:space:]]*=[[:space:]]*"localhost"$|databa
|
||||
-e 's|^database_driver[[:space:]]*=[[:space:]]*""$|database_driver = "sqlite"|g' \
|
||||
-e 's|^database_use_pdo[[:space:]]*=[[:space:]]*"no"$|database_use_pdo = "yes"|g' ${VROOT}/etc/codepot/codepot.ini
|
||||
|
||||
COPY httpd-fg.sh ${VROOT}/usr/sbin/
|
||||
RUN tar -C ${VROOT} -zcvf /tmp/codepot-root.tar.gz .
|
||||
|
||||
### -------------------------------------------------------------------------------
|
||||
@ -38,27 +39,26 @@ FROM rockylinux/rockylinux:latest
|
||||
|
||||
ARG VROOT
|
||||
|
||||
## epel-release for mod_perl
|
||||
RUN dnf install -y epel-release
|
||||
COPY --from=installer /tmp/codepot-root.tar.gz /tmp
|
||||
##COPY httpd-fg.sh /usr/sbin/
|
||||
|
||||
# for mysql access, include php-mysqli and perl-DBD-MYSQL
|
||||
RUN dnf install -y --enablerepo=powertools \
|
||||
## epel-release for mod_perl
|
||||
## for mysql access, include php-mysqli and perl-DBD-MYSQL
|
||||
RUN \
|
||||
dnf install -y epel-release && \
|
||||
dnf install -y --enablerepo=powertools \
|
||||
subversion subversion-perl \
|
||||
httpd php php-gd php-pdo php-ldap \
|
||||
perl-Digest-SHA perl-Config-Simple \
|
||||
perl-DBD-SQLite perl-LDAP perl-Mail-Sendmail perl-Switch \
|
||||
mod_dav_svn mod_perl diffutils sqlite
|
||||
|
||||
COPY --from=installer /tmp/codepot-root.tar.gz /tmp
|
||||
COPY httpd-fg.sh /usr/sbin/
|
||||
|
||||
RUN \
|
||||
mod_dav_svn mod_perl diffutils sqlite && \
|
||||
rm -rf /var/www/html && \
|
||||
mkdir -p /run/php-fpm && \
|
||||
tar -C / -zxvf /tmp/codepot-root.tar.gz && \
|
||||
cp -pf /etc/codepot/codepot.httpd /etc/httpd/conf.d/codepot.conf && \
|
||||
echo "PerlSwitches -Mlib=/etc/codepot/perl" >> /etc/httpd/conf.d/perl.conf && \
|
||||
sed -ri -e 's|^max_execution_time[[:space:]]*=.*$|max_execution_time = 120|g' /etc/php.ini
|
||||
sed -ri -e 's|^max_execution_time[[:space:]]*=.*$|max_execution_time = 120|g' /etc/php.ini && \
|
||||
rm -rf /tmp/*
|
||||
|
||||
##CMD ["/usr/sbin/httpd-fg.sh"]
|
||||
ENTRYPOINT ["/usr/sbin/httpd-fg.sh"]
|
||||
|
@ -33,6 +33,7 @@ RUN sed -ri -e 's|^database_hostname[[:space:]]*=[[:space:]]*"localhost"$|databa
|
||||
-e 's|^database_driver[[:space:]]*=[[:space:]]*""$|database_driver = "sqlite"|g' \
|
||||
-e 's|^database_use_pdo[[:space:]]*=[[:space:]]*"no"$|database_use_pdo = "yes"|g' ${VROOT}/etc/codepot/codepot.ini
|
||||
|
||||
COPY apache2-fg.sh ${VROOT}/usr/sbin/
|
||||
RUN tar -C ${VROOT} -zcvf /tmp/codepot-root.tar.gz .
|
||||
|
||||
|
||||
@ -42,19 +43,16 @@ FROM ubuntu:20.04
|
||||
|
||||
ARG VROOT
|
||||
|
||||
RUN apt update && \
|
||||
COPY --from=installer /tmp/codepot-root.tar.gz /tmp
|
||||
|
||||
RUN \
|
||||
apt update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends \
|
||||
subversion apache2 \
|
||||
php libapache2-mod-php php-gd php-sqlite3 php-ldap \
|
||||
libapache2-mod-perl2 libapache2-mod-svn \
|
||||
libswitch-perl libconfig-simple-perl libdigest-sha-perl \
|
||||
libdbd-sqlite3-perl libnet-ldap-perl libsvn-perl libmail-sendmail-perl \
|
||||
sqlite3 vim
|
||||
|
||||
COPY --from=installer /tmp/codepot-root.tar.gz /tmp
|
||||
COPY apache2-fg.sh /usr/sbin/
|
||||
|
||||
RUN \
|
||||
libdbd-sqlite3-perl libnet-ldap-perl libsvn-perl libmail-sendmail-perl sqlite3 vim-tiny && \
|
||||
rm -rf /var/www/html && \
|
||||
tar -C / -zxvf /tmp/codepot-root.tar.gz && \
|
||||
a2enmod rewrite && a2enmod headers && \
|
@ -1,11 +1,11 @@
|
||||
DOCKER ?= docker
|
||||
DOCKER ?= DOCKER_BUILDKIT=1 docker
|
||||
|
||||
all:
|
||||
@echo "Choose one of the following targets:"
|
||||
@echo " rocky ubnt2004"
|
||||
@echo " rocky ubnt"
|
||||
|
||||
ubnt2004: @srcdir@/codepot-@VERSION@.tar.gz
|
||||
$(DOCKER) build -t codepot:ubnt20.04 -f @srcdir@/Dockerfile.ubnt2004 @srcdir@ || true
|
||||
ubnt: @srcdir@/codepot-@VERSION@.tar.gz
|
||||
$(DOCKER) build -t codepot:ubnt -f @srcdir@/Dockerfile.ubnt @srcdir@ || true
|
||||
rm -f @srcdir@/codepot-@VERSION@.tar.gz
|
||||
|
||||
rocky: @srcdir@/codepot-@VERSION@.tar.gz
|
||||
|
@ -410,14 +410,14 @@ uninstall-am:
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
DOCKER ?= docker
|
||||
DOCKER ?= DOCKER_BUILDKIT=1 docker
|
||||
|
||||
all:
|
||||
@echo "Choose one of the following targets:"
|
||||
@echo " rocky ubnt2004"
|
||||
@echo " rocky ubnt"
|
||||
|
||||
ubnt2004: @srcdir@/codepot-@VERSION@.tar.gz
|
||||
$(DOCKER) build -t codepot:ubnt20.04 -f @srcdir@/Dockerfile.ubnt2004 @srcdir@ || true
|
||||
ubnt: @srcdir@/codepot-@VERSION@.tar.gz
|
||||
$(DOCKER) build -t codepot:ubnt -f @srcdir@/Dockerfile.ubnt @srcdir@ || true
|
||||
rm -f @srcdir@/codepot-@VERSION@.tar.gz
|
||||
|
||||
rocky: @srcdir@/codepot-@VERSION@.tar.gz
|
||||
|
@ -1,15 +1,15 @@
|
||||
If you require the root privilege to build a docker image, specify sudo in DOCKER.
|
||||
```
|
||||
make rocky8 DOCKER="sudo docker"
|
||||
make ubnt2004 DOCKER="sudo docker"
|
||||
make rocky DOCKER="sudo docker"
|
||||
make ubnt DOCKER="sudo docker"
|
||||
```
|
||||
|
||||
Run the service like
|
||||
```
|
||||
docker run -dit --restart=unless-stopped --name=codepot codepot:ubnt20.04
|
||||
docker run -dit --restart=unless-stopped --name=codepot -p 80:80 codepot:ubnt20.04
|
||||
docker run -dit --restart=unless-stopped --name=codepot -p 80:80 -v /home/container-data/codepot:/var/lib/codepot codepot:ubnt20.04
|
||||
docker run -dit --restart=unless-stopped --name=codepot -p 1200:1200 -v /home/container-data/codepot:/var/lib/codepot codepot:ubnt20.04 --port 1200 --hide-index-page=yes --https-redirected=yes
|
||||
docker run -dit --restart=unless-stopped --name=codepot codepot:ubnt
|
||||
docker run -dit --restart=unless-stopped --name=codepot -p 80:80 codepot:ubnt
|
||||
docker run -dit --restart=unless-stopped --name=codepot -p 80:80 -v /home/container-data/codepot:/var/lib/codepot codepot:ubnt
|
||||
docker run -dit --restart=unless-stopped --name=codepot -p 1200:1200 -v /home/container-data/codepot:/var/lib/codepot codepot:ubnt --port 1200 --hide-index-page=yes --https-redirected=yes
|
||||
```
|
||||
|
||||
Run the shell on the existing container for in-container management.
|
||||
|
@ -62,6 +62,7 @@ do
|
||||
echo " -hide-index-page yes/no hide/show the index page script from the URL"
|
||||
echo " -https-redirected yes/no indicate if the requets are HTTPS redirected"
|
||||
echo "-------------------------------------------------------------------------"
|
||||
exit 0
|
||||
;;
|
||||
p)
|
||||
SERVICE_PORT=${OPTARG#*=}
|
||||
|
@ -62,6 +62,7 @@ do
|
||||
echo " -hide-index-page yes/no hide/show the index page script from the URL"
|
||||
echo " -https-redirected yes/no indicate if the requets are HTTPS redirected"
|
||||
echo "-------------------------------------------------------------------------"
|
||||
exit 0
|
||||
;;
|
||||
p)
|
||||
SERVICE_PORT=${OPTARG#*=}
|
||||
|
Loading…
Reference in New Issue
Block a user