diff --git a/Dockerfile b/Dockerfile index 475262f..ce9d07b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -71,6 +71,8 @@ RUN mkdir -p /tmp/comanage && cd /tmp/comanage && \ tar xf $VERSION.tar.gz && \ mv $COMANAGE_PREFIX-$VERSION /opt/comanage/. && \ ln -s /opt/comanage/$VERSION /opt/comanage/current && \ + mkdir /var/cache/registry && \ + ln -s /var/cache/registry /opt/comanage/$COMANAGE_PREFIX-$VERSION/local/tmp && \ # # Cleanup rm -rf /tmp/comanage diff --git a/container_files/bin/configure_php.sh b/container_files/bin/configure_php.sh index 320ac38..db0bd55 100755 --- a/container_files/bin/configure_php.sh +++ b/container_files/bin/configure_php.sh @@ -38,10 +38,14 @@ else fi date >> $log echo "Preparing for cache" >> $log -mkdir -p /opt/comanage/comanage-registry-$VERSION/local/tmp/cache/persistent && \ -mkdir -p /opt/comanage/comanage-registry-$VERSION/local/tmp/cache/models && \ -chmod -R 777 /opt/comanage/comanage-registry-$VERSION/local/tmp/cache && \ -chown -R apache:apache /opt/comanage/comanage-registry-$VERSION/local/tmp/cache && \ +mkdir -p /var/cache/registry/cache/persistent && \ +mkdir -p /var/cache/registry/cache/models && \ +mkdir -p /var/cache/registry/logs && \ +mkdir -p /var/cache/registry/sessions && \ +mkdir -p /var/cache/registry/tests && \ +chmod -R 700 /var/cache/registry && \ +chown -R apache:apache /var/cache/registry && \ +chown -R apache:apache /opt/comanage/comanage-registry-$VERSION/local echo "Cache status: " >> $log ls -la /opt/comanage/comanage-registry-$VERSION/local/tmp/cache >> $log diff --git a/tests/image.bats b/tests/image.bats index 71ff5be..de810a1 100644 --- a/tests/image.bats +++ b/tests/image.bats @@ -20,6 +20,10 @@ load ../common docker run -i $maintainer/$imagename find /opt/comanage/comanage-registry-$version } +@test "COmanage cache link directory created" { + docker run -i $maintainer/$imagename find /opt/comanage/comanage-registry-$version/local/tmp -links 1 + +} @test "Autoexec firstrun capability detected" { docker run -i $maintainer/$imagename find /opt/autoexec/bin/firstrun.sh }