Skip to content

Commit

Permalink
More updates for building inside docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
hmusavi committed Nov 30, 2018
1 parent af141ab commit e219d1e
Show file tree
Hide file tree
Showing 33 changed files with 54 additions and 142 deletions.
7 changes: 7 additions & 0 deletions .dockerignore
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
40 changes: 16 additions & 24 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,30 @@ MAINTAINER [email protected]
# Set up the private repo first
WORKDIR /home/jpo-ode-private

COPY ./jpo-ode-private/pom.xml ./pom.xml
COPY ./jpo-ode-private/j2735/pom.xml ./j2735/pom.xml
COPY ./jpo-ode-private/ieee1609dot2/pom.xml ./ieee1609dot2/pom.xml
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 install:install-file -Dfile=./lib/LunaProvider.jar -DgroupId=com.safenet-inc -DartifactId=luna-provider -Dversion=6.2.2-4 -Dpackaging=jar
RUN mvn install:install-file -Dfile=./lib/jprov_sfnt.jar -DgroupId=com.safenet-inc -DartifactId=safenet-provider -Dversion=5.4 -Dpackaging=jar
RUN mvn install:install-file -Dfile=./lib/oss.jar -DgroupId=asn_1 -DartifactId=oss_soed -Dversion=6.3 -Dpackaging=jar
RUN mvn install:install-file -Dfile=./lib/osslean.jar -DgroupId=asn_1 -DartifactId=oss_lean -Dversion=6.3 -Dpackaging=jar
RUN mvn install:install-file -Dfile=./lib/osstoed.jar -DgroupId=asn_1 -DartifactId=oss_toed -Dversion=6.3 -Dpackaging=jar

RUN mvn dependency:go-offline -B

COPY ./jpo-ode-private .

RUN mvn clean
RUN mvn install -DskipTests

# Now set up the public repo
WORKDIR /home

# COPY ./pom.xml ./pom.xml
# COPY ./jpo-ode-core/pom.xml ./jpo-ode-core/pom.xml
# COPY ./jpo-ode-svcs/pom.xml ./jpo-ode-svcs/pom.xml
# COPY ./jpo-ode-plugins/pom.xml ./jpo-ode-plugins/pom.xml
# COPY ./jpo-ode-common/pom.xml ./jpo-ode-common/pom.xml
# COPY ./jpo-security/pom.xml ./jpo-security/pom.xml
# COPY ./jpo-security-svcs/pom.xml ./jpo-security-svcs/pom.xml
#
# RUN mvn dependency:go-offline package -B

COPY ./ ./
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

Expand Down
3 changes: 2 additions & 1 deletion build-and-deploy.sh
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
2 changes: 1 addition & 1 deletion build.cmd
Original file line number Diff line number Diff line change
@@ -1 +1 @@
mvn cleancall docker-compose build
call docker-compose build
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
mvn clean
#!/bin/bash
docker-compose build
3 changes: 3 additions & 0 deletions clean-build-and-deploy-ppm-nsv.cmd
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
4 changes: 1 addition & 3 deletions clean-build-and-deploy.cmd
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
5 changes: 1 addition & 4 deletions clean-build-and-deploy.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#!/bin/bash
docker-compose stop
docker-compose rm -f -v
mvn clean install
mvn --projects jpo-s3-deposit package assembly:single
docker-compose down
docker-compose up --build -d
docker-compose ps
4 changes: 0 additions & 4 deletions clean-build.cmd

This file was deleted.

File renamed without changes.
2 changes: 0 additions & 2 deletions deploy.cmd

This file was deleted.

2 changes: 0 additions & 2 deletions deploy.sh

This file was deleted.

2 changes: 1 addition & 1 deletion docker-run-adm.bat
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 jpo-ode_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
2 changes: 1 addition & 1 deletion docker-run-aem.bat
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=aem.properties jpo-ode_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=aem.properties jpoode_acm:latest %1
1 change: 1 addition & 0 deletions docker-run-depositor.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docker run -it --env-file=.env jpoode_s3dep:latest %1
2 changes: 1 addition & 1 deletion docker-run-ode.bat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
docker run -it -v %DOCKER_SHARED_VOLUME%:/ode_data -e DOCKER_HOST_IP=%DOCKER_HOST_IP% -p "8080:8080" -p "9090:9090" -p "46753:46753/udp" jpo-ode_ode:latest %1
docker run -it --env-file=.env -v %DOCKER_SHARED_VOLUME%:/ode_data -e DOCKER_HOST_IP=%DOCKER_HOST_IP% -p "8080:8080" -p "9090:9090" -p "46753:46753/udp" jpoode_ode:latest %1
2 changes: 1 addition & 1 deletion docker-run-ode.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/bash
docker run -it -v /var/run/docker.sock:/var/run/docker.sock -v ${DOCKER_SHARED_VOLUME}:/ppm_data -p '8080:8080' -e DOCKER_HOST_IP=$DOCKER_HOST_IP jpo-ode_ode:latest $1
docker run -it --env-file=.env -v /var/run/docker.sock:/var/run/docker.sock -v ${DOCKER_SHARED_VOLUME}:/ppm_data -p '8080:8080' -e DOCKER_HOST_IP=$DOCKER_HOST_IP jpoode_ode:latest $1
2 changes: 1 addition & 1 deletion docker-run-ppm-env-file.bat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
docker run -it -v %DOCKER_SHARED_VOLUME%:/ppm_data --env-file=.env jpoode_ppm:latest %1
docker run -it -v %DOCKER_SHARED_VOLUME%:/ppm_data --env-file=.env jpoode_ppm_tim:latest %1
2 changes: 1 addition & 1 deletion docker-run-ppm.bat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
docker run -it -v %DOCKER_SHARED_VOLUME%:/ppm_data -e DOCKER_HOST_IP=%DOCKER_HOST_IP% jpo-ode_ppm:latest %1
docker run -it --env-file=.env -v %DOCKER_SHARED_VOLUME%:/ppm_data -e DOCKER_HOST_IP=%DOCKER_HOST_IP% jpoode_ppm:latest %1
2 changes: 1 addition & 1 deletion docker-run-ppm.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/bash
docker run -it -v ${DOCKER_SHARED_VOLUME}:/ppm_data -e DOCKER_HOST_IP=${DOCKER_HOST_IP} jpo-ode_ppm:latest $1
docker run -it --env-file=.env -v ${DOCKER_SHARED_VOLUME}:/ppm_data -e DOCKER_HOST_IP=${DOCKER_HOST_IP} jpoode_ppm:latest $1
10 changes: 0 additions & 10 deletions full-build.cmd

This file was deleted.

10 changes: 0 additions & 10 deletions full-build.sh

This file was deleted.

16 changes: 0 additions & 16 deletions jpo-ode-core.launch

This file was deleted.

16 changes: 0 additions & 16 deletions jpo-ode-plugins.launch

This file was deleted.

16 changes: 0 additions & 16 deletions jpo-ode-svcs.launch

This file was deleted.

16 changes: 0 additions & 16 deletions jpo-ode.launch

This file was deleted.

2 changes: 1 addition & 1 deletion jpo-s3-deposit
2 changes: 1 addition & 1 deletion jpo-security
Submodule jpo-security updated 1 files
+1 −1 pom.xml
2 changes: 1 addition & 1 deletion jpo-security-svcs
3 changes: 0 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,11 @@
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>jpo-ode-private</module>
<module>jpo-ode-common</module>
<module>jpo-ode-plugins</module>
<module>jpo-ode-core</module>
<module>jpo-ode-svcs</module>
<module>jpo-security</module>
<module>jpo-security-svcs</module>
<module>jpo-s3-deposit</module>
</modules>

<repositories>
Expand Down
2 changes: 1 addition & 1 deletion start-kafka-shell.bat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock --env-file ./.env -it jpo-ode_kafka:latest /bin/bash
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock --env-file ./.env -it jpoode_kafka:latest /bin/bash
2 changes: 1 addition & 1 deletion start-kafka-shell.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/sh
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -e DOCKER_HOST_IP=${DOCKER_HOST_IP} -e ZK=${DOCKER_HOST_IP}:2181 -it jpo-ode_kafka:latest /bin/bash
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -e DOCKER_HOST_IP=${DOCKER_HOST_IP} -e ZK=${DOCKER_HOST_IP}:2181 -it jpoode_kafka:latest /bin/bash
10 changes: 9 additions & 1 deletion update_branch.cmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
@echo off

IF "%1"=="" (
echo usage: update_branch.sh branch_name
goto end
)

copy asn1_codec\asn1c_combined\J2735_201603DA.ASN .

rem Run the following commands to reset existing branch
Expand All @@ -15,4 +22,5 @@ git submodule update --recursive --init
rem Restore the J2735 ASN file
copy .\J2735_201603DA.ASN asn1_codec\asn1c_combined


:end
pause

0 comments on commit e219d1e

Please sign in to comment.