Browse Source

Added docker image

master
Carsten Wolfrum 4 months ago
parent
commit
12ea3c1d4b
No known key found for this signature in database GPG Key ID: EA794B7FC52905E5
5 changed files with 27 additions and 0 deletions
  1. +5
    -0
      contrib/docker/README.md
  2. +1
    -0
      contrib/docker/_env
  3. +6
    -0
      contrib/docker/build.sh
  4. +6
    -0
      contrib/docker/build/Dockerfile
  5. +9
    -0
      contrib/docker/docker-compose.yml

+ 5
- 0
contrib/docker/README.md 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
- 0
contrib/docker/_env View File

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

+ 6
- 0
contrib/docker/build.sh 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

+ 6
- 0
contrib/docker/build/Dockerfile 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"]

+ 9
- 0
contrib/docker/docker-compose.yml 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

Loading…
Cancel
Save