forked from usdot-jpo-ode/jpo-ode
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'node-xy-dockerBuildsImage' into open-ode
# Conflicts: # jpo-ode-plugins/pom.xml # jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/oss/Oss1609dot2CoderTest.java # jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/oss/OssAsn1CoderTest.java # jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/oss/UnavailableNumericFieldTest.java # jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/coder/FileDecoderPublisher.java # jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/udp/isd/IsdDepositor.java # jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/udp/trust/TrustManager.java # jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/coder/DecoderHelperTest.java # jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/coder/FileDecoderPublisherTest.java # jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/coder/RawBsmMfSorterTest.java # jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/security/SecurityManagerTest.java # jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/udp/UdpReceiverPublisherTest.java # jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/udp/isd/IsdDepositorTest.java # jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/udp/trust/TrustManagerTest.java # jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/udp/vsd/VsdDepositorTest.java # jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/wrapper/MessageProducerTest.java # pom.xml
- Loading branch information
Showing
101 changed files
with
741 additions
and
1,821 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# add git-ignore syntax here of things you don't want copied into docker image | ||
.git | ||
*Dockerfile* | ||
*docker-compose* | ||
node_modules | ||
*target* | ||
*.class |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,52 @@ | ||
FROM ubuntu:18.04 | ||
FROM maven:3.5.4-jdk-8-alpine as builder | ||
MAINTAINER [email protected] | ||
|
||
#Install necessary software | ||
RUN apt-get update && \ | ||
apt-get install -y software-properties-common git | ||
RUN apt-get update && \ | ||
apt-get install -y apt-utils | ||
RUN apt-get update && \ | ||
apt-get install -y wget supervisor dnsutils curl jq net-tools | ||
RUN apt-get update && \ | ||
apt-get install -y openjdk-8-jdk | ||
RUN apt-get update && \ | ||
apt-get install -y vim | ||
RUN apt-get update && \ | ||
apt-get install -y nano | ||
#RUN apt-get update && \ | ||
# apt-cache search maven && \ | ||
# apt-get install -y maven | ||
# Set up the private repo first | ||
WORKDIR /home/jpo-ode-private | ||
|
||
RUN apt-get clean | ||
|
||
##install docker | ||
#RUN apt-get install -y apt-transport-https ca-certificates | ||
#RUN apt-key adv \ | ||
# --keyserver hkp:https://ha.pool.sks-keyservers.net:80 \ | ||
# --recv-keys 58118E89F3A912897C070ADBF76221572C52609D | ||
#RUN echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | tee /etc/apt/sources.list.d/docker.list | ||
#RUN apt-get update && apt-get install -y docker docker-engine | ||
#RUN apt-cache policy docker-engine | ||
##RUN apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual | ||
#RUN service docker start | ||
|
||
#Add ODE binary files | ||
ADD jpo-ode-svcs/target/jpo-ode-svcs-0.0.1-SNAPSHOT.jar /home | ||
|
||
ADD docker/start-ode.sh /usr/bin/start-ode.sh | ||
ADD jpo-ode-svcs/src/main/resources/application.properties /home | ||
ADD jpo-ode-svcs/src/main/resources/logback.xml /home | ||
|
||
# Build ODE inside the image | ||
#RUN cd /home/jpo-ode/jpo-ode-private && mvn clean && mvn install | ||
#RUN cd /home/jpo-ode && mvn clean && mvn install | ||
#RUN cp /home/jpo-ode/jpo-ode-svcs/target/jpo-ode-svcs-0.0.1-SNAPSHOT.jar /home | ||
|
||
#Change permissions and run scripts | ||
RUN chmod a+x /usr/bin/start-ode.sh | ||
|
||
# Use "exec" form so that it runs as PID 1 (useful for graceful shutdown) | ||
#CMD bash -c 'start-kafka.sh & ; start-ode.sh' | ||
CMD bash -c 'start-ode.sh' | ||
COPY ./jpo-ode-private/pom.xml ./ | ||
COPY ./jpo-ode-private/j2735/pom.xml ./j2735/ | ||
COPY ./jpo-ode-private/j2735/src ./j2735/src | ||
COPY ./jpo-ode-private/ieee1609dot2/pom.xml ./ieee1609dot2/ | ||
COPY ./jpo-ode-private/ieee1609dot2/src ./ieee1609dot2/src | ||
COPY ./jpo-ode-private/lib/*.jar ./lib/ | ||
|
||
RUN mvn clean | ||
RUN mvn install -DskipTests | ||
|
||
# Now set up the public repo | ||
WORKDIR /home | ||
|
||
COPY ./pom.xml ./ | ||
COPY ./jpo-ode-core/pom.xml ./jpo-ode-core/ | ||
COPY ./jpo-ode-core/src ./jpo-ode-core/src/ | ||
COPY ./jpo-ode-svcs/pom.xml ./jpo-ode-svcs/ | ||
COPY ./jpo-ode-svcs/src ./jpo-ode-svcs/src | ||
COPY ./jpo-ode-plugins/pom.xml ./jpo-ode-plugins/ | ||
COPY ./jpo-ode-plugins/src ./jpo-ode-plugins/src | ||
COPY ./jpo-ode-common/pom.xml ./jpo-ode-common/ | ||
COPY ./jpo-ode-common/src ./jpo-ode-common/src | ||
COPY ./jpo-security/pom.xml ./jpo-security/ | ||
COPY ./jpo-security/src ./jpo-security/src | ||
|
||
RUN mvn clean install -DskipTests | ||
|
||
FROM openjdk:8u171-jre-alpine | ||
|
||
WORKDIR /home | ||
|
||
COPY --from=builder /home/jpo-ode-svcs/src/main/resources/application.properties /home | ||
COPY --from=builder /home/jpo-ode-svcs/src/main/resources/logback.xml /home | ||
COPY --from=builder /home/jpo-ode-svcs/target/jpo-ode-svcs-0.0.1-SNAPSHOT.jar /home | ||
|
||
ENTRYPOINT ["java", \ | ||
"-Djava.rmi.server.hostname=$DOCKER_HOST_IP", \ | ||
"-Dcom.sun.management.jmxremote.port=9090", \ | ||
"-Dcom.sun.management.jmxremote.rmi.port=9090", \ | ||
"-Dcom.sun.management.jmxremote", \ | ||
"-Dcom.sun.management.jmxremote.local.only=true", \ | ||
"-Dcom.sun.management.jmxremote.authenticate=false", \ | ||
"-Dcom.sun.management.jmxremote.ssl=false", \ | ||
"-Dlogback.configurationFile=/home/logback.xml", \ | ||
"-jar", \ | ||
"/home/jpo-ode-svcs-0.0.1-SNAPSHOT.jar"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
default: | ||
$(info Make target options:) | ||
$(info `make start` to build and run the ODE) | ||
$(info `make stop` to stop the ODE) | ||
$(info `make delete` to destroy the current Docker containers) | ||
$(info `make rebuild` to stop, delete, and then rebuild the containers) | ||
|
||
start: | ||
ifeq ("$(wildcard ./jpo-ode-private)", "") | ||
$(error "ERROR: Directory `jpo-ode-private` not found in ${PWD}") | ||
endif | ||
ifeq ("$(wildcard ./asn1_codec/asn1c_combined/J2735_201603DA.ASN)", "") | ||
cp ./jpo-ode-private/j2735/J2735_201603DA.ASN ./asn1_codec/asn1c_combined/J2735_201603DA.ASN | ||
endif | ||
ifndef DOCKER_HOST_IP | ||
$(error ERROR: Environment variable DOCKER_HOST_IP is not set) | ||
endif | ||
ifndef DOCKER_SHARED_VOLUME | ||
$(error ERROR: Environment variable DOCKER_SHARED_VOLUME is not set) | ||
endif | ||
ifeq ("$(wildcard .env)", "") | ||
$(warning "WARNING: Environment file `.env` not found in ${PWD}") | ||
endif | ||
docker-compose up --build -d | ||
|
||
stop: | ||
docker-compose down | ||
|
||
delete: | ||
docker-compose rm -fvs | ||
|
||
rebuild: | ||
$(MAKE) stop delete start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
#!/bin/bash | ||
docker-compose up --build --no-recreate -d | ||
docker-compose down | ||
docker-compose up --build -d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
call docker-compose build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
mvn clean install | ||
#!/bin/bash | ||
docker-compose build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
call docker-compose down | ||
call docker-compose -f docker-compose-ppm-nsv.yml up --build -d | ||
call docker-compose ps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
call docker-compose stop | ||
call docker-compose rm -f -v | ||
call mvn clean install -DskipTests | ||
call docker-compose down | ||
call docker-compose up --build -d | ||
call docker-compose ps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
#!/bin/bash | ||
docker-compose stop | ||
docker-compose rm -f -v | ||
mvn -DskipTests clean install | ||
docker-compose down | ||
docker-compose up --build -d | ||
docker-compose ps |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
0
docker/delete-nameless-images.sh → delete-nameless-images.sh
100644 → 100755
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
if [%1]==[] goto usage | ||
|
||
docker exec -it %1 %2 | ||
|
||
goto :eof | ||
|
||
:usage | ||
@echo Usage: docker-exec.bat ^<container name^> ^<command^> | ||
pause | ||
exit /B 1 | ||
|
||
:eof | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
docker run -it -v %DOCKER_SHARED_VOLUME%:/asn1_codec_share -e DOCKER_HOST_IP=%DOCKER_HOST_IP% -e ACM_CONFIG_FILE=adm.properties jpoode_acm:latest %1 | ||
docker run -it --env-file=.env -v %DOCKER_SHARED_VOLUME%:/asn1_codec_share -e DOCKER_HOST_IP=%DOCKER_HOST_IP% -e ACM_CONFIG_FILE=adm.properties jpoode_acm:latest %1 |
Oops, something went wrong.