mirror of
https://github.com/certat/intelmq-docker.git
synced 2025-12-06 09:12:49 +01:00
Changed container builds, using entrypoint instead of direct hug
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
This commit is contained in:
10
Dockerfile
10
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 <waldbauer@cert.at>" \
|
||||
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" ]
|
||||
|
||||
2
build.sh
2
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 \
|
||||
|
||||
Reference in New Issue
Block a user