forked from Yelp/detect-secrets
-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build docker images for DSS client (Yelp#248)
* Add script to build new docker images * Use baseline * Add dockerignore * Fix dockerfile dep * Different way to tag image
- Loading branch information
1 parent
331a2b8
commit 325bbb6
Showing
12 changed files
with
81 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
*.egg-info | ||
*.py[co] | ||
*.sw[op] | ||
|
||
/.git | ||
/.coverage | ||
/.github | ||
/.pytest_cache | ||
/.python-version | ||
/.tox | ||
/.vscode | ||
/tmp | ||
/user-config | ||
/venv | ||
/venv* | ||
|
||
.*ignore | ||
!.gitignore | ||
!.dockerignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,5 +10,6 @@ | |
|
||
.*ignore | ||
!.gitignore | ||
!.dockerignore | ||
.python-version | ||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
FROM python:3 | ||
LABEL maintainer="squad:git-defenders" url="https://github.ibm.com/whitewater/whitewater-detect-secrets" | ||
|
||
RUN apt-get -y remove --purge mysql* | ||
# Remediate CVE-2019-18218 | ||
RUN apt-get update && apt-get install file -y | ||
RUN pip install --upgrade pip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM git-defenders/python | ||
|
||
# Auto adjust line ending. Support running scan on Windows platform | ||
RUN git config --global core.autocrlf true | ||
|
||
COPY README.md /code/ | ||
COPY setup.py /code/ | ||
COPY setup.cfg /code/ | ||
COPY detect_secrets /code/detect_secrets | ||
|
||
RUN pip install /code | ||
|
||
WORKDIR /code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM git-defenders/python | ||
|
||
RUN apt-get update && apt-get install -y jq | ||
RUN mkdir -p /code | ||
COPY . /usr/src/app | ||
WORKDIR /usr/src/app | ||
RUN pip install /usr/src/app | ||
WORKDIR /code | ||
ENTRYPOINT [ "/usr/src/app/run-scan.sh" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FROM git-defenders/cli | ||
|
||
RUN git config --global core.safecrlf false | ||
ENTRYPOINT [ "detect-secrets-hook" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FROM git-defenders/cli | ||
ENTRYPOINT [ "detect-secrets" ] | ||
CMD [ "scan", "/code" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash -ex | ||
|
||
CUR_DIR=$(dirname $0) | ||
pushd "${CUR_DIR}" | ||
|
||
IMAGE_DOMAIN=git-defenders | ||
|
||
# build images | ||
for dockerfile in Dockerfiles/*.Dockerfile | ||
do | ||
image_name=$(echo -e $(basename ${dockerfile}) | cut -d\. -f2) | ||
docker build -f "${dockerfile}" -t $IMAGE_DOMAIN/$image_name . | ||
done | ||
|
||
# test images | ||
docker run -it --entrypoint detect-secrets $IMAGE_DOMAIN/dsl --version | ||
docker run -it $IMAGE_DOMAIN/detect-secrets --version | ||
docker run -it $IMAGE_DOMAIN/detect-secrets-hook --version | ||
|
||
popd |