Use reg server for registry build & deploy

This commit is contained in:
Tony Blyler 2021-05-16 23:23:19 -04:00
parent 448671004b
commit 397358c88b
Signed by: tblyler
GPG key ID: 7F13D9A60C0D678E
4 changed files with 12 additions and 4 deletions

1
.dockerignore Normal file
View file

@ -0,0 +1 @@
.git

1
.gitignore vendored
View file

@ -1 +0,0 @@
static

9
Dockerfile Normal file
View file

@ -0,0 +1,9 @@
FROM golang:1-alpine AS builder
RUN CGO_ENABLED=0 go get github.com/genuinetools/reg@master
FROM alpine:3.13
COPY --from=builder /go/bin/reg /usr/local/bin/reg
ENTRYPOINT ["/usr/local/bin/reg"]

View file

@ -1,8 +1,7 @@
.PHONY: build
build:
reg server --once registry.0xdad.com
../precompress/precompress ./static/
docker build -t registry.0xdad.com/reg:latest .
.PHONY: deploy
deploy: build
rsync --delete -hrvP ./static/ punk-deploy:/www/registry.0xdad.com/
docker push registry.0xdad.com/reg:latest