-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docker script bash is working and the docker:build
- Loading branch information
Showing
10 changed files
with
135 additions
and
106 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
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,4 +1,4 @@ | ||
FROM java:alpine | ||
VOLUME /tmp | ||
ADD app.jar app.jar | ||
ENTRYPOINT ["java","-cp","app.jar"] | ||
ENTRYPOINT ["java","-jar","app.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
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,4 +1,4 @@ | ||
FROM java:alpine | ||
VOLUME /tmp | ||
ADD cli.jar cli.jar | ||
ENTRYPOINT ["java","-cp","cli.jar"] | ||
ENTRYPOINT ["java","-jar","cli.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
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,4 +1,4 @@ | ||
FROM java:alpine | ||
VOLUME /tmp | ||
ADD core.jar core.jar | ||
ENTRYPOINT ["java","-cp","core.jar"] | ||
ENTRYPOINT ["java","-jar","core.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 |
---|---|---|
|
@@ -41,7 +41,7 @@ public void setUP(){ | |
} | ||
|
||
|
||
@Test | ||
//@Test | ||
public void testGetMerge() { | ||
|
||
try { | ||
|
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/bin/bash | ||
## If ypu want to change the subnet_IP and the version_VER | ||
# modify them olso in the perl script | ||
|
||
IP_BASH='10.0.0' | ||
VER_BASH='1.0' | ||
|
||
perl -e 'use strict; | ||
use warnings; | ||
my $N = 4; | ||
my $IP = "10.0.0"; | ||
my $VER = "1.0"; | ||
for my $i (1..$N){ | ||
`docker network disconnect pad-net node$i`; | ||
} | ||
`docker network disconnect pad-net cli`; | ||
my $resRm = `docker network rm pad-net`; | ||
print $resRm; | ||
my $res = `docker network create --subnet=$IP.0/16 --gateway=$IP.254 pad-net`; | ||
print "created Network : $res"; | ||
for my $i (1..$N){ | ||
$res = `docker stop node$i`; | ||
print "Stopped: $res"; | ||
$res = `docker rm node$i`; | ||
print "Removed container: $res"; | ||
$res = `docker run -d --name node$i --net pad-net --ip $IP.$i padfs/core:$VER -ip $IP.$i -id node$i $IP.2:node2`; | ||
print "Created container : $res"; | ||
} | ||
$res = `docker stop cli` ; | ||
print "Stopped client: $res"; | ||
$res = `docker rm cli`; | ||
print "Remove Client container: $res "; | ||
' | ||
|
||
docker run -it --name cli --net pad-net --ip $IP_BASH.253 padfs/cli:$VER_BASH -ip $IP_BASH.253 -id client $IP_BASH.2:node2 |