Skip to content

Commit

Permalink
[SERV-893] Update JDK + small config cleanup (#155)
Browse files Browse the repository at this point in the history
* Update JDK version
* Increment libtiff version
* Clean up config file locations
  • Loading branch information
ksclarke authored Aug 16, 2023
1 parent 39b7467 commit 66457a2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 16 deletions.
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@
<!-- Docker container dependency versions -->
<!-- https://packages.ubuntu.com/search?keywords=search -->
<ubuntu.tag>20.04</ubuntu.tag>
<openjdk.version>11.0.19+7~us1-0ubuntu1~20.04.1</openjdk.version>
<openjdk.version>11.0.20+8-1ubuntu1~20.04</openjdk.version>
<gcc.version>4:9.3.0-1ubuntu2</gcc.version>
<make.version>4.2.1-1.2</make.version>
<libtiff.version>4.1.0+git191117-2ubuntu0.20.04.8</libtiff.version>
<libtiff.version>4.1.0+git191117-2ubuntu0.20.04.9</libtiff.version>
<build.essential.version>12.8ubuntu1.1</build.essential.version>
<libopenjp2.version>2.3.1-1ubuntu4.20.04.1</libopenjp2.version>
<libturbojpeg.version>2.0.3-0ubuntu1.20.04.3</libturbojpeg.version>
Expand All @@ -98,7 +98,7 @@
<deploy.plugin.version>2.8.2</deploy.plugin.version>
<codacy.plugin.version>1.2.0</codacy.plugin.version>
<xml.maven.plugin.version>1.0.2</xml.maven.plugin.version>
<docker.maven.plugin.version>0.33.0</docker.maven.plugin.version>
<docker.maven.plugin.version>0.43.2</docker.maven.plugin.version>
<maven.download.plugin.version>1.3.0</maven.download.plugin.version>

<!-- What level of logging we want to see, by default, in our tests and default container config -->
Expand Down
12 changes: 6 additions & 6 deletions src/main/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ RUN if [ ! -z "${kakadu.version}" ]; then \
FROM ubuntu:${ubuntu.tag}

# The location of the Cantaloupe config file
ENV CONFIG_FILE="/etc/cantaloupe.properties"
ENV CONFIG_FILE="/etc/cantaloupe/cantaloupe.properties"

# We're using a percentage of available RAM
ENV HEAP_PERCENTAGE="80"
Expand Down Expand Up @@ -160,16 +160,16 @@ RUN if [ -z "${kakadu.version}" ]; then \

# Set up our config file (and config file override) components
COPY docker-entrypoint.sh /usr/local/bin/
COPY "configs/cantaloupe.properties.tmpl-${cantaloupe.version}" /etc/cantaloupe.properties.tmpl
COPY "configs/cantaloupe.properties.default-${cantaloupe.version}" /etc/cantaloupe.properties.default
COPY "configs/cantaloupe.properties.tmpl-${cantaloupe.version}" /etc/cantaloupe/cantaloupe.properties.tmpl
COPY "configs/cantaloupe.properties.default-${cantaloupe.version}" /etc/cantaloupe/cantaloupe.properties.default

# Set up a script to run Cantaloupe
COPY --chown=cantaloupe:users scripts/run_cantaloupe.sh /usr/local/bin/

# Set up application's sytem directories
RUN mkdir -p /var/log/cantaloupe /var/cache/cantaloupe && \
touch "$CONFIG_FILE" && \
chown -R cantaloupe -L /var/log/cantaloupe /var/cache/cantaloupe "$CONFIG_FILE" \
/usr/local/bin/docker-entrypoint.sh /usr/local/cantaloupe/
chown -R cantaloupe:users /var/log/cantaloupe /var/cache/cantaloupe /etc/cantaloupe /usr/local/cantaloupe/ \
/usr/local/bin/docker-entrypoint.sh

# Install grok JPEG-2000 library and tools
WORKDIR /tmp
Expand Down
7 changes: 3 additions & 4 deletions src/main/docker/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#!/usr/bin/env bash

# Define locations of our container's property values
PROPERTIES=/etc/cantaloupe.properties
PROPERTIES_TMPL=/etc/cantaloupe.properties.tmpl
PROPERTIES_DEFAULT=/etc/cantaloupe.properties.default
PROPERTIES_TMPL=/etc/cantaloupe/cantaloupe.properties.tmpl
PROPERTIES_DEFAULT=/etc/cantaloupe/cantaloupe.properties.default

# Define location of centralized maven repository
MAVEN_REPO="https://repo1.maven.org/maven2"
Expand Down Expand Up @@ -31,7 +30,7 @@ print(template.safe_substitute(properties))
EOT

# Write our merged properties file to /etc directory
$PYTHON -c "$SCRIPT" >> $PROPERTIES
$PYTHON -c "$SCRIPT" >> $CONFIG_FILE

# If we have a DELEGATE_URL, grab it and copy it to the container for us to use
if [[ -v DELEGATE_URL && ! -z DELEGATE_URL ]]; then
Expand Down
3 changes: 0 additions & 3 deletions src/main/docker/scripts/show_versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,9 @@ declare -a DEPENDENCIES=(
"gcc"
"python2"
"ffmpeg"
"imagemagick"
"curl"
"graphicsmagick"
"zip"
"unzip"
"wget"
"libturbojpeg"
"libopenjp2-tools"
"libtiff5"
Expand Down

0 comments on commit 66457a2

Please sign in to comment.