forked from ajv-validator/ajv-cli
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (23 loc) · 1.1 KB
/
Dockerfile
File metadata and controls
31 lines (23 loc) · 1.1 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
FROM node:22.22.0-slim
ARG BUILD_DATE
ARG APP_VERSION
LABEL org.opencontainers.image.authors='Martin Reinhardt (martin@m13t.de)' \
org.opencontainers.image.created=$BUILD_DATE \
org.opencontainers.image.version=$APP_VERSION \
org.opencontainers.image.url='https://hub.docker.com/r/continuoussecuritytooling/ajv-cli' \
org.opencontainers.image.documentation='https://github.com/ContinuousSecurityTooling/ajv-cli' \
org.opencontainers.image.source='https://github.com/ContinuousSecurityTooling/ajv-cli.git' \
org.opencontainers.image.licenses='MIT'
COPY dist/ docker_entrypoint.sh package-lock.json package.json /app
WORKDIR /app
RUN npm install --omit=dev &&\
npm install ajv-formats &&\
ln -s /app/index.js /usr/local/bin/ajv-cli && chmod +x /usr/local/bin/ajv-cli &&\
chown -R 1000:2000 /app /usr/local/bin/ajv-cli
# apt update
RUN apt-get update && apt-get -y upgrade &&\
apt-get install -y jq wget curl &&\
# clean up to slim image
apt-get clean autoclean && apt-get autoremove --yes && rm -rf /var/lib/{apt,dpkg,cache,log}/
USER 1000
ENTRYPOINT ["/app/docker_entrypoint.sh"]