diff --git a/ckan/Dockerfile b/ckan/Dockerfile index 75e8a4e..5c953ec 100644 --- a/ckan/Dockerfile +++ b/ckan/Dockerfile @@ -13,7 +13,7 @@ RUN \ # Add edge/testing repository echo '@edge http://dl-cdn.alpinelinux.org/alpine/edge/testing' >>/etc/apk/repositories \ # Install runtime dependencies - && apk --no-cache add geos@edge libjpeg-turbo libmagic libpq mailcap py2-pip zlib + && apk --no-cache add geos@edge libjpeg-turbo libmagic libpq mailcap py2-pip s6 zlib RUN \ # Install build dependencies @@ -47,8 +47,9 @@ RUN \ && find /srv/ckan/src -name '.git*' -exec rm -rf {} + \ && rm -rf /root/.cache +COPY docker/ / + VOLUME ["/etc/ckan", "/srv/ckan/storage"] EXPOSE 8080 -USER ckan -CMD ["paster", "serve", "/etc/ckan/ckan.ini"] +CMD ["s6-svscan", "/etc/services.d"] diff --git a/ckan/docker/etc/services.d/.s6-svscan/finish b/ckan/docker/etc/services.d/.s6-svscan/finish new file mode 100755 index 0000000..78d5fdc --- /dev/null +++ b/ckan/docker/etc/services.d/.s6-svscan/finish @@ -0,0 +1,3 @@ +#!/bin/sh + +/bin/true diff --git a/ckan/docker/etc/services.d/ckan/run b/ckan/docker/etc/services.d/ckan/run new file mode 100755 index 0000000..d37675e --- /dev/null +++ b/ckan/docker/etc/services.d/ckan/run @@ -0,0 +1,5 @@ +#!/bin/execlineb -P + +fdmove -c 2 1 +s6-setuidgid 8003:8003 +/usr/bin/paster serve /etc/ckan/ckan.ini