From 5a7ce59fb4e036f43c852cb76af31e4d41227cf7 Mon Sep 17 00:00:00 2001 From: Vishesh Handa Date: Wed, 2 Oct 2019 08:34:14 +0200 Subject: [PATCH] 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. --- gj_common/Dockerfile | 12 ++++-------- gj_common/Makefile | 6 ++++++ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/gj_common/Dockerfile b/gj_common/Dockerfile index eccda614..a05f3a35 100644 --- a/gj_common/Dockerfile +++ b/gj_common/Dockerfile @@ -1,9 +1,5 @@ -FROM ubuntu:latest +FROM alpine:latest -RUN apt-get update -RUN apt-get install -y build-essential libssl-dev autoconf git gettext -RUN apt-get install -y zlib1g-dev vim -RUN apt-get install -y clang cmake - -COPY ./build-libgit2.sh / -RUN ./build-libgit2.sh +RUN apk update +RUN apk add clang libgit2-dev +RUN apk add bash make libc-dev g++ vim diff --git a/gj_common/Makefile b/gj_common/Makefile index b26bd85e..b9e82d90 100644 --- a/gj_common/Makefile +++ b/gj_common/Makefile @@ -2,3 +2,9 @@ CC=clang test: gitjournal.c test.c keygen.c common.c $(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