mirror of
https://git.burble.com/burble.dn42/dn42regsrv.git
synced 2024-02-26 20:28:04 +01:00
Added docker image
This commit is contained in:
parent
1a957d2910
commit
12ea3c1d4b
5
contrib/docker/README.md
Normal file
5
contrib/docker/README.md
Normal file
@ -0,0 +1,5 @@
|
||||
# How to run
|
||||
|
||||
* Run ./build.sh
|
||||
* Rename _env to .env and replace REGISTRYDIR with the path to your dn42 registry clone
|
||||
* docker-compose up
|
1
contrib/docker/_env
Normal file
1
contrib/docker/_env
Normal file
@ -0,0 +1 @@
|
||||
REGISTRYDIR=/somedir
|
6
contrib/docker/build.sh
Executable file
6
contrib/docker/build.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
docker run -it -v $(dirname "$(dirname $PWD)"):/go/src/dn42regsrv golang:alpine ash -c 'apk add git && cd src/dn42regsrv && go get && cp /go/bin/dn42regsrv .'
|
||||
cd ../../
|
||||
docker build -t dn42regsrv -f contrib/docker/build/Dockerfile .
|
||||
rm -f dn42regsrv
|
6
contrib/docker/build/Dockerfile
Normal file
6
contrib/docker/build/Dockerfile
Normal file
@ -0,0 +1,6 @@
|
||||
FROM alpine:latest
|
||||
WORKDIR /app
|
||||
RUN apk add git
|
||||
COPY dn42regsrv /app/
|
||||
COPY StaticRoot /app/StaticRoot
|
||||
ENTRYPOINT ["/app/dn42regsrv"]
|
9
contrib/docker/docker-compose.yml
Normal file
9
contrib/docker/docker-compose.yml
Normal file
@ -0,0 +1,9 @@
|
||||
version: '2'
|
||||
services:
|
||||
dn42regsrv:
|
||||
image: dn42regsrv
|
||||
restart: always
|
||||
ports:
|
||||
- 127.0.0.1:8042:8042
|
||||
volumes:
|
||||
- ${REGISTRYDIR}:/app/registry
|
Loading…
Reference in New Issue
Block a user