diff options
author | Mitya Selivanov <automainint@guattari.tech> | 2024-08-12 09:07:48 +0200 |
---|---|---|
committer | Mitya Selivanov <automainint@guattari.tech> | 2024-08-12 09:07:48 +0200 |
commit | 167bbbfb84e17ddef81bd9ef7abc6b430d044b94 (patch) | |
tree | 083dfd77d568dc885b0d992f01b763ead720e322 /Dockerfile | |
download | cgi-167bbbfb84e17ddef81bd9ef7abc6b430d044b94.zip |
Add code
Diffstat (limited to 'Dockerfile')
-rw-r--r-- | Dockerfile | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..15f1596 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,24 @@ +FROM nginx:alpine + +RUN apk add git-daemon cgit certbot certbot-nginx fcgiwrap apache2-utils gcc musl-dev +RUN adduser -D -h /srv/git git + +WORKDIR /usr/build/ +COPY bootstrap.sh . +COPY main.c . +COPY static ./static + +RUN DEBIAN_FRONTEND=noninteractive sh bootstrap.sh + +RUN printf "\ + git daemon --reuseaddr --base-path=/srv/git/ /srv/git/ &\n\ + fcgiwrap -f &\n\ + nginx &\n\ + wait -n\n\ + exit $?\ +" >> /usr/local/bin/entrypoint + +# ssh, http, https, git +EXPOSE 22 80 443 9418 + +ENTRYPOINT [ "entrypoint" ] |