This repository was archived by the owner on Feb 26, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
59 lines (43 loc) · 1.71 KB
/
Dockerfile
File metadata and controls
59 lines (43 loc) · 1.71 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
FROM node:12-alpine as node-build
COPY lib/node-sslyze/package.json lib/node-sslyze/package-lock.json /src/lib/node-sslyze/
WORKDIR /src/lib/node-sslyze/
RUN npm ci --production
COPY package.json package-lock.json /src/
WORKDIR /src
RUN npm ci --production
COPY lib/ src/lib/
COPY . /src
FROM python:3.7-slim
RUN apt-get update && \
apt-get -y upgrade && \
curl -sL https://deb.nodesource.com/setup_12.x | bash - && \
apt-get install -y nodejs && \
apt-get -y clean
RUN pip install sslyze==3.0.3 && \
python -m sslyze --update_trust_store
COPY --from=node-build /src /src
WORKDIR /src
HEALTHCHECK --interval=30s --timeout=5s --start-period=120s --retries=3 CMD node healthcheck.js || exit 1
RUN addgroup --system sslyze_group && adduser --system --ingroup sslyze_group sslyze_user
USER sslyze_user
EXPOSE 8080
ARG COMMIT_ID=unkown
ARG REPOSITORY_URL=unkown
ARG BRANCH=unkown
ARG BUILD_DATE
ARG VERSION
ENV SCB_COMMIT_ID ${COMMIT_ID}
ENV SCB_REPOSITORY_URL ${REPOSITORY_URL}
ENV SCB_BRANCH ${BRANCH}
LABEL org.opencontainers.image.title="secureCodeBox scanner-infrastructure-sslyze" \
org.opencontainers.image.description="SSLyze integration for secureCodeBox" \
org.opencontainers.image.authors="iteratec GmbH" \
org.opencontainers.image.vendor="iteratec GmbH" \
org.opencontainers.image.documentation="https://github.com/secureCodeBox/secureCodeBox" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.version=$VERSION \
org.opencontainers.image.url=$REPOSITORY_URL \
org.opencontainers.image.source=$REPOSITORY_URL \
org.opencontainers.image.revision=$COMMIT_ID \
org.opencontainers.image.created=$BUILD_DATE
ENTRYPOINT [ "node", "index.js" ]