Commit Graph
4 Commits
Author SHA1 Message Date
Peter Benjamin 59f1f02480 Update Dockerfile
Simplified Dockerfile.
Here's what changed and why:

- No need for `RUN mkdir -p $PROJECT` because `WORKDIR` automatically creates directories if they don't exist.
- No need to `RUN git clone https://github.com/zricethezav/gitleaks.git . ` since we're building the container image locally and we have the project files available locally. Therefore, no need to reach out to the internet to re-download it.
  - just `COPY` all local files into the current working directory (which is `/go/src/.../.../gitleaks`) in the container.
- No need to `RUN apk update && apk upgrade && apk add --no-cache bash git openssh`, because `apk update` and `apk upgrade` cache files locally in the container, thus leading to bloated image size.
  - Just simply do `apk add --no-cache ...` to install dependencies without writing any cache locally. This is equivalent to `apk update && apk upgrade && apk add ... && rm -rf /var/logs/apk/cache/*`
- Removed `WORKDIR /app` as there is no need for it. The compiled binary is placed in `/usr/bin/`.
2018-02-27 11:54:09 -08:00
zcong1993 780123c5be add docker WORKDIR 2018-02-23 12:08:52 +08:00
zcong1993 c4738ef26f reduce docker image size 2018-02-23 11:52:41 +08:00
Raphael ATALLAH d9d87410e2 Added dockerfile 2018-02-22 08:59:59 +01:00