-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
30 lines (23 loc) · 974 Bytes
/
Dockerfile
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
FROM node:lts-alpine as builder
LABEL name="SAF" \
vendor="The MITRE Corporation" \
version="${SAF_VERSION}" \
release="1" \
url="https://github.com/mitre/saf" \
description="The MITRE Security Automation Framework (SAF) Command Line Interface (CLI) brings together applications, techniques, libraries, and tools developed by MITRE and the security community to streamline security automation for systems and DevOps pipelines" \
docs="https://github.com/mitre/saf" \
run="docker run -d --name ${NAME} ${IMAGE} <args>"
RUN mkdir -p /share
COPY . /build
WORKDIR /build
RUN rm -rf test
RUN yarn --frozen-lockfile --production --network-timeout 600000
RUN yarn pack --install-if-needed --prod --filename saf.tgz
FROM node:lts-alpine
COPY --from=builder /build/saf.tgz /build/
RUN npm install -g /build/saf.tgz
# Useful for CI pipelines
RUN apk add bash jq curl ca-certificates
ENTRYPOINT ["saf"]
VOLUME ["/share"]
WORKDIR /share