Commit cd0bcb31 authored by Evgeny Kusmenko's avatar Evgeny Kusmenko

Merge branch 'docker-update' into 'master'

Docker update

See merge request !11
parents 50b40b68 8f83922b
Pipeline #191309 failed with stages
in 1 minute and 53 seconds
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
stages: stages:
- build - build
- docker
masterJobLinux: masterJobLinux:
stage: build stage: build
...@@ -29,6 +30,9 @@ masterJobLinux: ...@@ -29,6 +30,9 @@ masterJobLinux:
- master - master
tags: tags:
- se - se
artifacts:
paths:
- install/rmi-model-server.jar
masterJobWindows: masterJobWindows:
stage: build stage: build
...@@ -36,6 +40,8 @@ masterJobWindows: ...@@ -36,6 +40,8 @@ masterJobWindows:
- mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B clean install --settings settings.xml - mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B clean install --settings settings.xml
tags: tags:
- Windows10 - Windows10
only:
- master
BranchJobLinux: BranchJobLinux:
stage: build stage: build
...@@ -57,3 +63,20 @@ BranchJobLinux: ...@@ -57,3 +63,20 @@ BranchJobLinux:
- master - master
tags: tags:
- se - se
masterJobDocker:
image: docker:dind
stage: docker
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
tags:
- docker
script:
- cd docker
- sh ./build.sh
- docker tag rmi-server:latest $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
- docker tag rmi-server:latest $CI_REGISTRY_IMAGE:latest
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
- docker push $CI_REGISTRY_IMAGE:latest
only:
- master
...@@ -10,10 +10,14 @@ FROM openjdk:8 ...@@ -10,10 +10,14 @@ FROM openjdk:8
WORKDIR /app WORKDIR /app
COPY HardwareEmulator.so ./ RUN apt-get update && \
apt-get install -y --no-install-recommends libxext6 libxrender1 libxtst6 && \
rm -rf /var/lib/apt/lists/* && \
echo "export LD_LIBRARY_PATH=/usr/local/openjdk-8/jre/lib/amd64" > ~/.bashrc
COPY rmi-model-server.jar ./rmi-model-server.jar COPY rmi-model-server.jar ./rmi-model-server.jar
COPY ./autopilots/ ./autopilots/ COPY ./autopilots/ ./autopilots/
COPY ./autopilots/ ./autopilots/AutopilotAdapter
CMD exec java -cp rmi-model-server.jar -Djava.rmi.server.codebase=file:rmi-model-server.jar -Djava.rmi.server.hostname=localhost rwth.rmi.model.server.RMIServer 10101 autopilots --no-zookeeper \ CMD exec bash -c "source ~/.bashrc && java -jar rmi-model-server.jar -Djava.rmi.server.hostname=localhost port=10101 autopilots_folder=autopilots no-zookeeper \
no_time os=linux no_time os=windows"
...@@ -7,8 +7,7 @@ ...@@ -7,8 +7,7 @@
# #
rm rmi-model-server-*.jar cp ../install/rmi-model-server.jar ./
cp ../target/rmi-model-server-*-jar-with-dependencies.jar ./rmi-model-server.jar cp -r ../install/autopilots ./autopilots
cp ../install/HardwareEmulator.so ./
docker build -t rmi-server . docker build -t rmi-server .
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment