Open ghost opened 7 years ago
Hi git-crypt is packaged on alpine https://pkgs.alpinelinux.org/package/edge/community/x86/git-crypt
These days building is done this way:
$ docker run --rm -it alpine:3.20
/ # apk add git build-base openssl-dev
/ # git clone https://github.com/AGWA/git-crypt
/ # cd git-crypt
/git-crypt # apk add curl
/git-crypt # curl 'https://gitlab.archlinux.org/archlinux/packaging/packages/git-crypt/-/raw/0.7.0-2/openssl-3.0.patch?ref_type=tags' \
-o openssl-3.0.patch
/git-crypt # patch -p1 < openssl-3.0.patch
/git-crypt # make CXXFLAGS='-Wall -pedantic -Wno-long-long -O0 -g3'
/git-crypt # ./git-crypt --version
Containerize git-crypt
Simple dockerfile that builds git-crypt for alpine linux and wraps it in a small container ~9MB.
Context
I recently started working with https://github.com/concourse/concourse and as a result needed a way to be able to decrypt and encrypt my repos without too much effort.
Problem Statement
Working with concourse introduced a restriction where every task is in a new container. It simply made sense to create a base image that extended a small footprint ( like https://github.com/gliderlabs/docker-alpine ) and alpine does not contain an apk package for git-crypt. It was easy enough to build in-image and remove the utils leaving a alpine+git-crypt image.
Solution
Create an alpine image that has git-crypt already bundled.
Pending work