Use reg server for registry build & deploy
This commit is contained in:
parent
448671004b
commit
397358c88b
1
.dockerignore
Normal file
1
.dockerignore
Normal file
|
@ -0,0 +1 @@
|
|||
.git
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +0,0 @@
|
|||
static
|
9
Dockerfile
Normal file
9
Dockerfile
Normal 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"]
|
5
Makefile
5
Makefile
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue