Commit 28443055 authored by Carsten Schlote's avatar Carsten Schlote
Browse files

Cleaned up Dockerfile and build.sh script

How to configure tomcat ?
parent 8c53bcaf
Pipeline #613 failed with stages
in 55 seconds
......@@ -16,9 +16,6 @@ RUN git clone --depth=1 https://github.com/plantuml/plantuml-server.git \
&& cp target/plantuml.war /var/lib/tomcat8/webapps/plantuml.war \
&& chown tomcat8:tomcat8 /var/lib/tomcat8/webapps/plantuml.war
# && service tomcat8 restart
EXPOSE 8080/tcp
CMD [ "tomcat8", "-p" ]
CMD /usr/share/tomcat8/bin/catalina.sh run
......@@ -2,45 +2,9 @@
# shellcheck disable=SC2059
set -ex
DEBIAN_BASE_IMAGE=docker.vahanus.com:5000/debian/ntp:latest
DEBIAN_BASE_IMAGE=gitlab.vahanus.net:5050/vahanus/public/container-plantuml
if test -n "$1" ; then DEBIAN_BASE_IMAGE="$1" ; fi
NET_IP4_IP=5.9.92.73
NET_IP6_IP=2a01:4f8:161:716e:dead:beef:0:2
ENABLE_NTP_LOCAL_BROADCAST=0
NET_IP4_SUBNET=5.9.92.72
NET_IP4_NETMASK=255.255.255.248
NET_IP6_SUBNET=2a01:4f8:161:716e:dead:beef::
NET_IP6_NETMASK=ffff:ffff:ffff:ffff:ffff:ffff::
NTP_RESTRICT_SUBNETS=$(cat <<EOF
restrict $NET_IP4_SUBNET mask $NET_IP4_NETMASK nomodify notrap
restrict -6 $NET_IP6_SUBNET mask $NET_IP6_NETMASK nomodify notrap
restrict 192.168.12.0 mask 255.255.255.0 nomodify notrap
restrict -6 fd0a:192:168:12:: mask ffff:ffff:ffff:ffff:: nomodify notrap
EOF
)
NTP_RESTRICT_INTERFACE=$(cat <<EOF
interface listen $NET_IP4_IP
interface listen $NET_IP6_IP
interface listen 192.168.12.10
interface listen fd0a:192:168:12::10
EOF
)
export NTP_RESTRICT_SUBNETS NTP_RESTRICT_INTERFACE
# Setup sources.list for DEB repo and distro
printf "$(cat ntp_conf_template)\n" "$NTP_RESTRICT_SUBNETS" "$NTP_RESTRICT_INTERFACE" > ntp.conf
if test "$ENABLE_NTP_LOCAL_BROADCAST" = "1" ; then
sed -i \
-e "/#broadcast 224.0.1.1/{ s|#||g; }" \
-e "/#broadcast ff05\:\:101/{ s|#||g; }" ntp.conf
fi
# Now build the image
docker image build --pull \
--build-arg DEBIAN_FRONTEND=noninteractive \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment