Skip to content

Instantly share code, notes, and snippets.

@ilyaglow
Last active July 22, 2019 08:19
Show Gist options
  • Save ilyaglow/df2a1f2a9cd725002d4ef7083a133ba5 to your computer and use it in GitHub Desktop.
Save ilyaglow/df2a1f2a9cd725002d4ef7083a133ba5 to your computer and use it in GitHub Desktop.
Dockerfile for GitGot https://github.com/BishopFox/GitGot
# Run example:
# docker run -it --rm -e ACCESS_TOKEN=no-permissions-access-token gitgot -q '"domain.com"'
FROM python:3-alpine
LABEL maintainer "Ilya Glotov <contact@ilyaglotov.com>"
ENV SSDEEP_VERSION="release-2.14.1" \
BUILD_DEPS="build-base \
automake \
autoconf \
libtool" \
ACCESS_TOKEN=""
RUN apk --update --no-cache add $BUILD_DEPS \
git \
libffi-dev \
&& git clone --depth=1 --branch=$SSDEEP_VERSION https://github.com/ssdeep-project/ssdeep.git \
&& cd ssdeep \
&& autoreconf -i \
&& ./configure \
&& make \
&& make install \
&& cd / \
&& rm -rf /ssdeep \
\
&& git clone --branch=access-token-from-env --depth=1 https://github.com/ilyaglow/GitGot.git /gitgot \
&& cd /gitgot \
&& pip3 install -r requirements.txt \
\
&& apk del $BUILD_DEPS \
\
&& adduser -D gitgot \
&& mkdir logs \
&& chown -R gitgot:gitgot logs
VOLUME /gitgot/logs
WORKDIR /gitgot
USER gitgot
ENTRYPOINT ["python3", "gitgot.py"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment