-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (31 loc) · 1.06 KB
/
Dockerfile
File metadata and controls
41 lines (31 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
FROM registry.access.redhat.com/ubi9/ubi
ARG VERSION=1.0.5
LABEL name="ubi8-clamav" \
vendor="Red Hat" \
version="${VERSION}" \
release="1" \
summary="UBI 9 ClamAV" \
description="ClamAV for UBI 9" \
maintainer="EPIC"
RUN yum -y update
RUN yum -y install https://www.clamav.net/downloads/production/clamav-${VERSION}.linux.x86_64.rpm
RUN yum -y install nc wget
# copy our configs to where clamav expects
COPY config/clamd.conf /usr/local/etc/clamd.conf
COPY config/freshclam.conf /usr/local/etc/freshclam.conf
RUN mkdir -p /opt/app-root/src
RUN chown -R 1001:0 /opt/app-root/src
RUN chmod -R ug+rwx /opt/app-root/src
# copy health check script to app-root
COPY clamdcheck.sh /opt/app-root
RUN chmod ug+rwx /opt/app-root/clamdcheck.sh
# # To fix check permissions error for clamAV
RUN mkdir /var/log/clamav
RUN touch /var/log/clamav/clamav.log
RUN touch /var/log/clamav/freshclam.log
RUN chown -R 1001:0 /var/log/clamav
RUN chmod -R ug+rwx /var/log/clamav
RUN chown -R 1001:0 /opt/app-root/src
USER 1001
EXPOSE 3310
CMD freshclam && clamd