-
Notifications
You must be signed in to change notification settings - Fork 426
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #437 from kartoza/entrypoint
Entrypoint fixes
- Loading branch information
Showing
7 changed files
with
86 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,15 +4,11 @@ ARG JAVA_HOME=/usr/local/openjdk-11 | |
FROM tomcat:$IMAGE_VERSION | ||
|
||
LABEL maintainer="Tim Sutton<[email protected]>" | ||
ARG GS_VERSION=2.21.0 | ||
ARG GS_VERSION=2.21.1 | ||
ARG WAR_URL=https://downloads.sourceforge.net/project/geoserver/GeoServer/${GS_VERSION}/geoserver-${GS_VERSION}-war.zip | ||
ARG STABLE_PLUGIN_BASE_URL=https://sonik.dl.sourceforge.net | ||
ARG DOWNLOAD_ALL_STABLE_EXTENSIONS=1 | ||
ARG DOWNLOAD_ALL_COMMUNITY_EXTENSIONS=1 | ||
ARG GEOSERVER_UID=1000 | ||
ARG GEOSERVER_GID=10001 | ||
ARG USER=geoserveruser | ||
ARG GROUP_NAME=geoserverusers | ||
ARG HTTPS_PORT=8443 | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
#Install extra fonts to use with sld font markers | ||
|
@@ -22,7 +18,7 @@ RUN set -eux; \ | |
locales gnupg2 wget ca-certificates rpl pwgen software-properties-common iputils-ping \ | ||
apt-transport-https curl gettext fonts-cantarell lmodern ttf-aenigma \ | ||
ttf-bitstream-vera ttf-sjfonts tv-fonts libapr1-dev libssl-dev \ | ||
wget zip unzip curl xsltproc certbot cabextract gettext postgresql-client figlet; \ | ||
wget zip unzip curl xsltproc certbot cabextract gettext postgresql-client figlet gosu; \ | ||
# Install gdal3 - bullseye doesn't build libgdal-java anymore so we can't upgrade | ||
curl https://deb.meteo.guru/velivole-keyring.asc | apt-key add - \ | ||
&& echo "deb https://deb.meteo.guru/debian buster main" > /etc/apt/sources.list.d/meteo.guru.list \ | ||
|
@@ -31,7 +27,9 @@ RUN set -eux; \ | |
dpkg-divert --local --rename --add /sbin/initctl \ | ||
&& (echo "Yes, do as I say!" | apt-get remove --force-yes login) \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
&& rm -rf /var/lib/apt/lists/*; \ | ||
# verify that the binary works | ||
gosu nobody true | ||
|
||
ENV \ | ||
JAVA_HOME=${JAVA_HOME} \ | ||
|
@@ -45,35 +43,26 @@ ENV \ | |
RANDFILE=/etc/certs/.rnd \ | ||
FONTS_DIR=/opt/fonts \ | ||
GEOSERVER_HOME=/geoserver \ | ||
EXTRA_CONFIG_DIR=/settings | ||
EXTRA_CONFIG_DIR=/settings \ | ||
COMMUNITY_PLUGINS_DIR=/community_plugins \ | ||
STABLE_PLUGINS_DIR=/stable_plugins | ||
|
||
|
||
WORKDIR /scripts | ||
ADD resources /tmp/resources | ||
ADD build_data /build_data | ||
ADD scripts /scripts | ||
|
||
RUN groupadd -r ${GROUP_NAME} -g ${GEOSERVER_GID} && \ | ||
useradd -l -m -d /home/${USER}/ -u ${GEOSERVER_UID} --gid ${GEOSERVER_GID} -s /bin/bash -G ${GROUP_NAME} ${USER}; \ | ||
mkdir -p ${GEOSERVER_DATA_DIR} ${CERT_DIR} ${FOOTPRINTS_DATA_DIR} ${FONTS_DIR} \ | ||
${GEOWEBCACHE_CACHE_DIR} ${GEOSERVER_HOME} ${EXTRA_CONFIG_DIR} /community_plugins /stable_plugins \ | ||
/geo_data; \ | ||
cp /build_data/stable_plugins.txt /stable_plugins && cp /build_data/community_plugins.txt /community_plugins && \ | ||
cp /build_data/letsencrypt-tomcat.xsl ${CATALINA_HOME}/conf/ssl-tomcat.xsl; \ | ||
echo $GS_VERSION > /scripts/geoserver_version.txt ;\ | ||
RUN echo $GS_VERSION > /scripts/geoserver_version.txt ;\ | ||
chmod +x /scripts/*.sh;/scripts/setup.sh \ | ||
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*;chown -R ${USER}:${GROUP_NAME} \ | ||
${CATALINA_HOME} ${FOOTPRINTS_DATA_DIR} ${GEOSERVER_DATA_DIR} /scripts ${CERT_DIR} ${FONTS_DIR} \ | ||
/tmp/ /home/${USER}/ /community_plugins/ /stable_plugins ${GEOSERVER_HOME} ${EXTRA_CONFIG_DIR} \ | ||
/usr/share/fonts/ /geo_data;chmod o+rw ${CERT_DIR} | ||
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
||
|
||
EXPOSE $HTTPS_PORT | ||
|
||
|
||
USER ${GEOSERVER_UID} | ||
RUN echo 'figlet -t "Kartoza Docker GeoServer"' >> ~/.bashrc | ||
VOLUME ["${GEOSERVER_DATA_DIR}", "${CERT_DIR}", "${FOOTPRINTS_DATA_DIR}", "${FONTS_DIR}"] | ||
|
||
WORKDIR ${GEOSERVER_HOME} | ||
|
||
CMD ["/bin/bash", "/scripts/entrypoint.sh"] | ||
ENTRYPOINT ["/bin/bash", "/scripts/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters