Skip to content

Instantly share code, notes, and snippets.

@lufia
Created March 2, 2022 04:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lufia/3a44f4a67492b4aca1463a6232cccca8 to your computer and use it in GitHub Desktop.
Save lufia/3a44f4a67492b4aca1463a6232cccca8 to your computer and use it in GitHub Desktop.
Dockerfile builds an image running bash that is enabled git-subrepo
#
# usage: docker run -ti --rm -v $(pwd):/docs -v ~/.ssh:/root/.ssh:ro xx
#
FROM debian:11
RUN apt-get update && \
apt-get install -y git make golang && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
mkdir -p /app /docs && \
git clone https://github.com/ingydotnet/git-subrepo.git /app/git-subrepo && \
echo 'source /app/git-subrepo/.rc' >/etc/profile.d/git-subrepo.sh
WORKDIR /docs
ENTRYPOINT ["/bin/bash", "--login"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment