From 7de0fe467a0a864910f19564bc30dec635ecef79 Mon Sep 17 00:00:00 2001 From: Nicola Murino Date: Wed, 27 Nov 2019 09:47:25 +0100 Subject: [PATCH] docker: install git so support for Git repo is available using the sample Dockerfiles --- docker/sftpgo/alpine/Dockerfile | 3 ++- docker/sftpgo/debian/Dockerfile | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docker/sftpgo/alpine/Dockerfile b/docker/sftpgo/alpine/Dockerfile index 8b89a9dc..3df0aa2d 100644 --- a/docker/sftpgo/alpine/Dockerfile +++ b/docker/sftpgo/alpine/Dockerfile @@ -9,7 +9,8 @@ RUN go build -i -ldflags "-s -w -X github.com/drakkan/sftpgo/utils.commit=`git d FROM alpine:latest -RUN apk add --no-cache ca-certificates su-exec \ +# git is optional it allows to serve Git repositories over SSH +RUN apk add --no-cache ca-certificates su-exec git \ && mkdir -p /data /etc/sftpgo /srv/sftpgo/config /srv/sftpgo/web COPY --from=builder /go/bin/sftpgo /bin/ diff --git a/docker/sftpgo/debian/Dockerfile b/docker/sftpgo/debian/Dockerfile index a48a0381..7415b578 100644 --- a/docker/sftpgo/debian/Dockerfile +++ b/docker/sftpgo/debian/Dockerfile @@ -10,6 +10,9 @@ RUN go build -i -ldflags "-s -w -X github.com/drakkan/sftpgo/utils.commit=`git d # now define the run environment FROM debian:latest +# git is optional it allows to serve Git repositories over SSH +RUN apt-get update && apt-get install -y git + ARG BASE_DIR=/app ARG DATA_REL_DIR=data ARG CONFIG_REL_DIR=config