gj_common: Improve build env

ubuntu:latest has changed and compiling libgit2 doesn't have us ssh
support. Cannot seem to figure it out, so lets just use a pre-compiled
version of libgit2, it's a little ahead of the version I'm using, but
that should be fine.
This commit is contained in:
Vishesh Handa
2019-10-02 08:34:14 +02:00
parent 300acbd787
commit 5a7ce59fb4
2 changed files with 10 additions and 8 deletions

View File

@ -1,9 +1,5 @@
FROM ubuntu:latest FROM alpine:latest
RUN apt-get update RUN apk update
RUN apt-get install -y build-essential libssl-dev autoconf git gettext RUN apk add clang libgit2-dev
RUN apt-get install -y zlib1g-dev vim RUN apk add bash make libc-dev g++ vim
RUN apt-get install -y clang cmake
COPY ./build-libgit2.sh /
RUN ./build-libgit2.sh

View File

@ -2,3 +2,9 @@ CC=clang
test: gitjournal.c test.c keygen.c common.c test: gitjournal.c test.c keygen.c common.c
$(CC) -o test -g test.c common.c gitjournal.c keygen.c -lgit2 -lssl -lcrypto $(CC) -o test -g test.c common.c gitjournal.c keygen.c -lgit2 -lssl -lcrypto
build-env: Dockerfile
docker build -t gitjournal_lib .
shell:
docker run --rm -it -v `pwd`:/code -w /code gitjournal_lib bash