From 2df693a2fd39968b149ace363699e2799429cdcb Mon Sep 17 00:00:00 2001 From: root Date: Fri, 17 Dec 2021 11:01:07 +0000 Subject: [PATCH 1/3] Fixed an issue with docker host-mounted volumes, where images fail to start due to an empty volume /git/data --- Dockerfile | 1 - docker-compose.yml | 7 ++++--- 2 files changed, 4 insertions(+), 4 deletions(-) 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/docker-compose.yml b/docker-compose.yml index bf4d809..7aa0891 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,8 +8,9 @@ services: ports: - "1234:22" volumes: - - git_data:/git/data -volumes: - git_data: + - ./git_data:/git/data +# entrypoint: sleep 100000000 +#volumes: +# git_data: From 96cb33bd5f0b63f071e6187ef1b38b895b4d7003 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 17 Dec 2021 11:04:39 +0000 Subject: [PATCH 2/3] Fixed an issue with docker host-mounted volumes, where images fail to start due to an empty volume /git/data --- docker-compose.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 7aa0891..d24c1a9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,8 +9,4 @@ services: - "1234:22" volumes: - ./git_data:/git/data -# entrypoint: sleep 100000000 -#volumes: -# git_data: - From ab087d59fe995fa0097ebf1dcd7ad435c15e05e5 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 17 Dec 2021 11:05:43 +0000 Subject: [PATCH 3/3] Fixed an issue with docker host-mounted volumes, where images fail to start due to an empty volume /git/data --- bootstrap.sh | 5 +++++ 1 file changed, 5 insertions(+) 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