feat(dev docker image) Add Development Docker version

This commit is contained in:
Erik Ziegler 2018-07-10 17:20:27 +02:00
parent 216a8fb2b6
commit 847e693a2f
3 changed files with 82 additions and 1 deletions

View File

@ -26,7 +26,7 @@ env:
jobs:
include:
- stage: build docker image
- stage: build production docker image
before_script:
- export REPO=ohif/viewer
- export COMMIT=${TRAVIS_COMMIT::8}
@ -47,6 +47,27 @@ jobs:
- docker push $REPO:travis-$TRAVIS_BUILD_NUMBER
- docker push $REPO:$COMMIT
- stage: build development docker image
before_script:
- export REPO=ohif/viewer-dev
- export COMMIT=${TRAVIS_COMMIT::8}
- export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
- echo "TRAVIS_BRANCH=$TRAVIS_BRANCH, PR=$PR, BRANCH=$BRANCH"
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo $TRAVIS_BRANCH ; fi`
- echo "TAG=$TAG, COMMIT=$COMMIT"
- docker pull $REPO:latest
- docker --version
script:
- docker build -f development.Dockerfile -t $REPO:$COMMIT . --cache-from $REPO:latest
after_success:
- docker tag $REPO:$COMMIT $REPO:$TAG
- docker tag $REPO:$COMMIT $REPO:travis-$TRAVIS_BUILD_NUMBER
- docker images
- docker login -u $DOCKER_USER -p $DOCKER_PASS
- docker push $REPO:$TAG
- docker push $REPO:travis-$TRAVIS_BUILD_NUMBER
- docker push $REPO:$COMMIT
- stage: build standalone viewer
if: branch = master
before_script:

30
development.Dockerfile Normal file
View File

@ -0,0 +1,30 @@
# First stage of multi-stage build
# Installs Meteor and builds node.js version
# This stage is named 'builder'
# The data for this intermediary image is not included
# in the final image.
FROM node:8.10.0-slim as builder
RUN apt-get update && apt-get install -y \
curl \
g++ \
build-essential
RUN curl https://install.meteor.com/ | sh
# Create a non-root user
RUN useradd -ms /bin/bash user
USER user
RUN mkdir /home/user/Viewers
COPY OHIFViewer/package.json /home/user/Viewers/OHIFViewer/
ADD --chown=user:user . /home/user/Viewers
WORKDIR /home/user/Viewers/OHIFViewer
ENV METEOR_PACKAGE_DIRS=../Packages
RUN meteor npm install
COPY dockersupport/settings.json .
EXPOSE 3000
CMD ["meteor", "--settings", "settings.json"]

View File

@ -0,0 +1,30 @@
{
"servers": {
"dicomWeb": [
{
"name": "Orthanc",
"wadoUriRoot": "http://pacsIP:8042/wado",
"qidoRoot": "http://pacsIP:8042/dicom-web",
"wadoRoot": "http://pacsIP:8042/dicom-web",
"qidoSupportsIncludeField": false,
"imageRendering": "wadouri",
"thumbnailRendering": "wadors",
"requestOptions": {
"auth": "orthanc:orthanc",
"logRequests": true,
"logResponses": false,
"logTiming": true
}
}
]
},
"defaultServiceType": "dicomWeb",
"public": {
"ui": {
"studyListDateFilterNumDays": 1
}
},
"proxy": {
"enabled": true
}
}