Skip to content

Commit

Permalink
simple django image
Browse files Browse the repository at this point in the history
  • Loading branch information
mchmarny committed Mar 22, 2023
1 parent b3f6f0c commit 66292c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 19 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ To review the imported vulnerabilities in GCP:
gcloud artifacts docker images list $repo \
--show-occurrences \
--format json \
--occurrence-filter 'kind="VULNERABILITY" AND noteProjectId="$project" AND resource_url="$image" AND noteId="CVE-2005-2541"'
--occurrence-filter "kind=\"VULNERABILITY\" AND resource_url=\"https://$image\""
```

You can also navigate to Artifact Registry to view the vulnerabilities there.
Expand Down
20 changes: 2 additions & 18 deletions examples/apps/django/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,8 @@
# syntax=docker/dockerfile:1.4

FROM --platform=$BUILDPLATFORM python:3.7-alpine AS builder
EXPOSE 8000
FROM python:3.7-alpine AS builder
EXPOSE 8080
WORKDIR /app
COPY requirements.txt /app
RUN pip3 install -r requirements.txt --no-cache-dir
COPY . /app
ENTRYPOINT ["python3"]
CMD ["manage.py", "runserver", "0.0.0.0:8000"]

FROM builder as dev-envs
RUN <<EOF
apk update
apk add git
EOF

RUN <<EOF
addgroup -S docker
adduser -S --shell /bin/bash --ingroup docker vscode
EOF
# install Docker tools (cli, buildx, compose)
COPY --from=gloursdocker/docker / /
CMD ["manage.py", "runserver", "0.0.0.0:8080"]

0 comments on commit 66292c9

Please sign in to comment.