Final changes before moving to cgit
This commit is contained in:
parent
7acbd71876
commit
af92a65229
15
Dockerfile
15
Dockerfile
|
@ -1,13 +1,10 @@
|
||||||
FROM scratch
|
FROM lscr.io/linuxserver/openssh-server:latest
|
||||||
|
|
||||||
|
ENV USER_NAME=git
|
||||||
|
RUN apk add --no-cache --upgrade git lighttpd tor git-gitweb python3
|
||||||
|
|
||||||
|
|
||||||
COPY --from=lscr.io/linuxserver/openssh-server:latest / /
|
COPY /root/ /
|
||||||
|
|
||||||
RUN apk add --no-cache --upgrade git lighthttpd tor \
|
CMD ["/bin/bash", "/usr/local/bin/run-tor.sh"]#["tor", "--runasdaemon", "0"]
|
||||||
&& mkdir -p /repo && cd /repo && git init . --bare \
|
|
||||||
&& mkdir -p /var/lib/tor/git \
|
|
||||||
&& mkdir -p /var/lib/tor/gitweb \
|
|
||||||
COPY /root /
|
|
||||||
COPY
|
|
||||||
CMD ["tor", "--runasdaemon 0"]
|
|
||||||
ENTRYPOINT ["/init"]
|
ENTRYPOINT ["/init"]
|
||||||
|
|
5
Makefile
5
Makefile
|
@ -1,8 +1,11 @@
|
||||||
TAG=$(git describ)
|
TAG = $(shell git describe)
|
||||||
|
|
||||||
build:
|
build:
|
||||||
docker build -t lxsameer/hephaestus:$(TAG) .
|
docker build -t lxsameer/hephaestus:$(TAG) .
|
||||||
|
|
||||||
|
run:
|
||||||
|
docker run -d --name test -e PUID=1000 -e PGID=1000 -e TZ=Etc/UTC -e PUBLIC_KEY_DIR=$(PWD)/pub_keys/ -p 2222:22 -p 9000:9000 lxsameer/hephaestus:$(TAG)
|
||||||
|
|
||||||
push:
|
push:
|
||||||
docker push lxsameer/hephaestus:$(TAG)
|
docker push lxsameer/hephaestus:$(TAG)
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
#!/command/execlineb -P
|
#!/command/execlineb -P
|
||||||
export GITWEB_PROJECTROOT=/repo
|
fdmove -c 2 1
|
||||||
git-instaweb -b /bin/true -l
|
cd /repo
|
||||||
|
exec sudo -u git git instaweb -b /bin/true -p 9000 -d python
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
|
User git
|
||||||
|
PIDFile /tor/tor.pid
|
||||||
|
DataDirectory /tor/
|
||||||
|
|
||||||
HiddenServiceDir /var/lib/tor/git/
|
HiddenServiceDir /var/lib/tor/git/
|
||||||
HiddenServicePort 22 127.0.0.1:22
|
HiddenServicePort 22 127.0.0.1:22
|
||||||
HiddenServiceAuthorizeClient stealth git
|
HiddenServiceVersion 3
|
||||||
|
|
||||||
HiddenServiceDir /var/lib/tor/gitweb/
|
HiddenServiceDir /var/lib/tor/gitweb/
|
||||||
HiddenServicePort 80 127.0.0.1:1234
|
HiddenServicePort 80 127.0.0.1:9000
|
||||||
HiddenServiceAuthorizeClient stealth gitweb
|
HiddenServiceVersion 3
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
#! /bin/bash
|
||||||
|
echo "Fix perms"
|
||||||
|
mkdir -p /repo
|
||||||
|
cd /repo || exit 1
|
||||||
|
chown git:git /repo
|
||||||
|
sudo -u git git init . --bare
|
||||||
|
mkdir -p /var/lib/tor/git
|
||||||
|
mkdir -p /var/lib/tor/gitweb && mkdir -p /tor
|
||||||
|
|
||||||
|
chown git:git /var/lib/tor/git/
|
||||||
|
chown git:git /var/lib/tor/gitweb/
|
||||||
|
chown git:git /tor/
|
||||||
|
chmod 0700 /var/lib/tor/git/
|
||||||
|
chmod 0700 /var/lib/tor/gitweb/
|
||||||
|
chmod 0700 /tor
|
||||||
|
|
||||||
|
tor --runasdaemon 0
|
Loading…
Reference in New Issue