Skip to content
Snippets Groups Projects
Commit adeb7ab2 authored by nimrod's avatar nimrod
Browse files

pre-commit.

Checks from a common snippet for Docker projects. Address issues.
parent ed3fe39a
No related branches found
No related tags found
No related merge requests found
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks.git
rev: v3.4.0
hooks:
- id: check-added-large-files
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-symlinks
- id: trailing-whitespace
- repo: https://github.com/Yelp/detect-secrets
rev: v0.14.3
hooks:
- id: detect-secrets
- repo: https://github.com/adrienverge/yamllint
rev: v1.25.0
hooks:
- id: yamllint
- repo: https://github.com/amperser/proselint/
rev: 0.10.2
hooks:
- id: proselint
types: [plain-text]
exclude: LICENSE
- repo: https://github.com/executablebooks/mdformat.git
rev: 0.5.3
hooks:
- id: mdformat
- repo: https://git.shore.co.il/nimrod/shell-pre-commit.git
rev: v0.6.0
hooks:
- id: shell-lint
- repo: https://github.com/shellcheck-py/shellcheck-py.git
rev: v0.7.1.1
hooks:
- id: shellcheck
- repo: https://git.shore.co.il/nimrod/docker-pre-commit.git/
rev: v0.3.0
hooks:
- id: hadolint
- id: docker-compose
FROM buildpack-deps:stretch-scm as build FROM buildpack-deps:stretch-scm as build
ARG VERSION=1.0.5 ARG VERSION=1.0.5
ENV DEBIAN_FRONTEND noninteractive ENV DEBIAN_FRONTEND noninteractive
# hadolint ignore=DL3008,DL3015
RUN apt-get update && \ RUN apt-get update && \
apt-get install -y \ apt-get install -y \
build-essential \ build-essential \
...@@ -8,14 +9,14 @@ RUN apt-get update && \ ...@@ -8,14 +9,14 @@ RUN apt-get update && \
libpcap-dev \ libpcap-dev \
&& \ && \
git clone https://github.com/robertdavidgraham/masscan.git --branch ${VERSION} && \ git clone https://github.com/robertdavidgraham/masscan.git --branch ${VERSION} && \
cd masscan && \ make -jC masscan
make -j
FROM debian:stretch-slim FROM debian:stretch-slim
ARG VERSION=1.0.5 ARG VERSION=1.0.5
LABEL MASSCAN_VERSION=${VERSION} LABEL MASSCAN_VERSION=${VERSION}
# hadolint ignore=DL3008
RUN apt-get update && \ RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y libpcap0.8 && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends libpcap0.8 && \
rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/* /var/cache/apt/archives/* rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/* /var/cache/apt/archives/*
COPY --from=build /masscan/bin/masscan /usr/local/bin/ COPY --from=build /masscan/bin/masscan /usr/local/bin/
ENTRYPOINT ["/usr/local/bin/masscan"] ENTRYPOINT ["/usr/local/bin/masscan"]
...@@ -12,7 +12,7 @@ This software is licensed under the MIT license (see `LICENSE.txt`). ...@@ -12,7 +12,7 @@ This software is licensed under the MIT license (see `LICENSE.txt`).
## Author Information ## Author Information
Nimrod Adar, [contact me](mailto:nimrod@shore.co.il) or visit my [website]( Nimrod Adar, [contact me](mailto:nimrod@shore.co.il) or visit my
https://www.shore.co.il/). Patches are welcome via [`git send-email`]( [website](https://www.shore.co.il/). Patches are welcome via
http://git-scm.com/book/en/v2/Git-Commands-Email). The repository is located [`git send-email`](http://git-scm.com/book/en/v2/Git-Commands-Email). The repository
at: <https://git.shore.co.il/explore/>. is located at: <https://git.shore.co.il/expore/>.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment