websoft9/docker/w9gitea/Dockerfile

15 lines
514 B
Docker
Raw Normal View History

2023-09-15 09:16:20 +08:00
# step1: build hook-api exe
FROM docker.io/library/golang:1.21-alpine3.18 as build-hook
WORKDIR /
COPY hook.go /
RUN go build -o hook /hook.go
# step2: from gitea image clone library, copy hook, s6 run script ...
FROM gitea/gitea:1.20.4
2023-09-15 10:15:09 +08:00
RUN cd / && git clone --depth=1 https://github.com/Websoft9/docker-library.git \
&& mv docker-library library
2023-09-15 09:16:20 +08:00
COPY --from=build-hook /hook /usr/local/bin/hook
2023-09-15 10:16:39 +08:00
COPY init.sh /usr/local/bin/init.sh
2023-09-15 10:18:41 +08:00
COPY hook init /etc/s6/
2023-09-15 10:10:50 +08:00
RUN chmod -R 755 /etc/s6/hook /usr/local/bin/init.sh