This commit is contained in:
James 2020-12-11 10:20:36 +00:00
commit e95651837f
5 changed files with 67 additions and 0 deletions

4
.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
/src/
/home/
/old/

45
dev/Dockerfile Normal file
View File

@ -0,0 +1,45 @@
FROM golang:1.15-alpine3.12
ARG GOPROXY
ENV GOPROXY ${GOPROXY:-direct}
ARG GITEA_VERSION
ARG TAGS="sqlite sqlite_unlock_notify"
ENV TAGS "bindata timetzdata $TAGS"
ARG CGO_EXTRA_CFLAGS
#Build deps
RUN apk --no-cache add build-base git nodejs npm
WORKDIR /src
EXPOSE 22 3000
RUN apk --no-cache add \
bash \
ca-certificates \
curl \
gettext \
git \
linux-pam \
openssh \
s6 \
sqlite \
su-exec \
gnupg
RUN addgroup \
-S -g 1000 \
git && \
adduser \
-S -H -D \
-h /home/git \
-s /bin/bash \
-u 1000 \
-G git \
git && \
echo "git:$(dd if=/dev/urandom bs=24 count=1 status=none | base64)" | chpasswd
ENV USER git
VOLUME ["/home"]

14
docker-compose.yml Normal file
View File

@ -0,0 +1,14 @@
version: '3.1'
services:
gitea-dev:
build: dev
ports:
- 3000:3000
user: 1000:1000
volumes:
- ./home:/home
- ./src:/src
# networks:
# default:
# external:
# name: default

2
make.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/bash
docker-compose run gitea-dev make

2
run.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/bash
docker-compose run gitea-dev ./gitea