Skip to content

Commit

Permalink
Add trivy and update OS
Browse files Browse the repository at this point in the history
  • Loading branch information
taxidis committed Sep 27, 2022
1 parent bbab2a8 commit 81271ca
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ FROM node:16.13.2-alpine as builder
ARG USER_ID
ARG GROUP_ID

RUN if [ ${USER_ID:-0} -ne 0 ] && [ ${GROUP_ID:-0} -ne 0 ]; then \
RUN apk update && \
apk upgrade && \
rm -rf /var/cache/apk/* && \
if [ ${USER_ID:-0} -ne 0 ] && [ ${GROUP_ID:-0} -ne 0 ]; then \
deluser node && \
addgroup -g ${GROUP_ID} node && \
adduser -u ${USER_ID} -D node -G node \
Expand Down
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ _build:
--target ${TARGET_IMAGE} \
-t ${TARGET_IMAGE}:${TARGET_TAG} .

trivy:
make build_prod && \
docker run --rm \
-v /var/run/docker.sock:/var/run/docker.sock \
aquasec/trivy image \
--no-progress --ignore-unfixed --severity HIGH,CRITICAL \
transifex-delivery:latest

up:
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up

Expand Down

0 comments on commit 81271ca

Please sign in to comment.