diff --git a/Dockerfile b/Dockerfile index 2658b7b..a9c6289 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,6 @@ COPY bootstrap.sh ./ RUN touch /var/log/messages - EXPOSE 22 VOLUME /git/data diff --git a/bootstrap.sh b/bootstrap.sh index a5f411b..09f3d7c 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -1,5 +1,10 @@ #!/bin/sh +# stuff from Dockerfile to allow the VOLUME to work: +mkdir -p /git/data \ + && mkdir -p /git/data/keys \ + && mkdir -p /git/data/users + maybe_build_key(){ if [ -f "/git/data/keys/ssh_host_$1_key" ] then diff --git a/docker-compose.yml b/docker-compose.yml index bf4d809..d24c1a9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,8 +8,5 @@ services: ports: - "1234:22" volumes: - - git_data:/git/data -volumes: - git_data: - + - ./git_data:/git/data