Browse Source

docker: install git

so support for Git repo is available using the sample Dockerfiles
Nicola Murino 5 years ago
parent
commit
7de0fe467a
2 changed files with 5 additions and 1 deletions
  1. 2 1
      docker/sftpgo/alpine/Dockerfile
  2. 3 0
      docker/sftpgo/debian/Dockerfile

+ 2 - 1
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
 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
   && mkdir -p /data /etc/sftpgo /srv/sftpgo/config /srv/sftpgo/web
 
 
 COPY --from=builder /go/bin/sftpgo /bin/
 COPY --from=builder /go/bin/sftpgo /bin/

+ 3 - 0
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
 # now define the run environment
 FROM debian:latest
 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 BASE_DIR=/app
 ARG DATA_REL_DIR=data
 ARG DATA_REL_DIR=data
 ARG CONFIG_REL_DIR=config
 ARG CONFIG_REL_DIR=config