1
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:
Carsten Wolfrum 2020-05-16 23:19:17 +02:00
parent 1a957d2910
commit 12ea3c1d4b
No known key found for this signature in database
GPG Key ID: EA794B7FC52905E5
5 changed files with 27 additions and 0 deletions

5
contrib/docker/README.md Normal file
View 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
View File

@ -0,0 +1 @@
REGISTRYDIR=/somedir

6
contrib/docker/build.sh Executable file
View 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

View File

@ -0,0 +1,6 @@
FROM alpine:latest
WORKDIR /app
RUN apk add git
COPY dn42regsrv /app/
COPY StaticRoot /app/StaticRoot
ENTRYPOINT ["/app/dn42regsrv"]

View File

@ -0,0 +1,9 @@
version: '2'
services:
dn42regsrv:
image: dn42regsrv
restart: always
ports:
- 127.0.0.1:8042:8042
volumes:
- ${REGISTRYDIR}:/app/registry