Commit 872a3409 authored by Hengwen Zhang's avatar Hengwen Zhang

Update dockerfiles

parent 50b40b68
Pipeline #189873 failed with stage
in 1 minute and 46 seconds
......@@ -37,23 +37,39 @@ masterJobWindows:
tags:
- Windows10
# BranchJobLinux:
# stage: build
# image: maven:3-jdk-8
# before_script:
# - apt update
# - apt --assume-yes install libxext6
# - apt --assume-yes install libxrender1
# - apt --assume-yes install libxtst6
# #- apt --assume-yes install realpath
# script:
# - "JAWT_LIB=$(find / -name libjawt.so -print -quit)"
# - "echo JAWT_LIB: $JAWT_LIB"
# - "JAWT_FOLDER=$(dirname ${JAWT_LIB})"
# - "echo JAWT_FOLDER: $JAWT_FOLDER"
# - "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${JAWT_FOLDER}"
# - mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B clean install --settings settings.xml
# except:
# - master
# tags:
# - se
BranchJobLinux:
image: docker:dind
stage: build
image: maven:3-jdk-8
before_script:
- apt update
- apt --assume-yes install libxext6
- apt --assume-yes install libxrender1
- apt --assume-yes install libxtst6
#- apt --assume-yes install realpath
script:
- "JAWT_LIB=$(find / -name libjawt.so -print -quit)"
- "echo JAWT_LIB: $JAWT_LIB"
- "JAWT_FOLDER=$(dirname ${JAWT_LIB})"
- "echo JAWT_FOLDER: $JAWT_FOLDER"
- "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${JAWT_FOLDER}"
- mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B clean install --settings settings.xml
except:
- master
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
tags:
- se
- docker
script:
- mvn clean install -s settings.xml
- 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
......@@ -10,10 +10,14 @@ FROM openjdk:8
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 ./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 \
no_time os=linux
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"
......@@ -7,8 +7,6 @@
#
rm rmi-model-server-*.jar
cp ../target/rmi-model-server-*-jar-with-dependencies.jar ./rmi-model-server.jar
cp ../install/HardwareEmulator.so ./
cp ../install/rmi-model-server.jar ./
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