diff --git a/Dockerfile b/Dockerfile index f812138..43809ac 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,5 @@ FROM debian:buster +ENV LANG C.UTF-8 ARG BUILD_DATE ARG VCS_REF @@ -15,9 +16,9 @@ LABEL maintainer="Sebastian Waldbauer " \ org.label-schema.vendor="CERT.AT" \ org.label-schema.version=$BUILD_VERSION -ENV LANG C.UTF-8 COPY ./intelmq /opt/intelmq COPY ./intelmq-manager /opt/intelmq-manager + WORKDIR /opt RUN apt-get update \ @@ -38,8 +39,6 @@ RUN useradd -d /opt/intelmq -U -s /bin/bash intelmq \ && echo "%sudo ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers \ && sudo chown -R intelmq:intelmq /opt/intelmq -ADD --chown=intelmq:intelmq entrypoint.sh /opt/entrypoint.sh - ### Install IntelMQ RUN cd /opt/intelmq \ && pip3 install --no-cache-dir -e . \ @@ -55,6 +54,9 @@ RUN mkdir /opt/intelmq/etc/manager/ \ && chgrp www-data /opt/intelmq/etc/*.conf /opt/intelmq/etc/manager/positions.conf \ && chmod g+w /opt/intelmq/etc/*.conf /opt/intelmq/etc/manager/positions.conf +ADD entrypoint.sh /opt/entrypoint.sh +RUN chmod +x /opt/entrypoint.sh + USER intelmq -ENTRYPOINT [ "entrypoint.sh" ] +ENTRYPOINT [ "/opt/entrypoint.sh" ] diff --git a/build.sh b/build.sh index f2f0b6c..6c828aa 100755 --- a/build.sh +++ b/build.sh @@ -11,7 +11,7 @@ echo Build_date: $build_date cp -r ../intelmq ./intelmq cp -r ../intelmq-manager ./intelmq-manager -docker build --no-cache --build-arg BUILD_DATE=$build_date \ +docker build --build-arg BUILD_DATE=$build_date \ --build-arg VCS_REF="$git_ref_core, $git_ref_manager" \ --build-arg BUILD_VERSION=$build_version \ -f Dockerfile \