-
Notifications
You must be signed in to change notification settings - Fork 170
Dockerize Simulator #60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
codcod
wants to merge
17
commits into
OpenSmpp:master
Choose a base branch
from
codcod:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 5 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
6bf3754
Dockerize Simulator
codcod eb21ed1
Better images that also work on Darwin
codcod 9c838c3
Add newlines
codcod 11e6632
Update Readme re scripts to run Docker
codcod 9cc0e09
Remove option to choose port and stick with 2775
codcod 0a859cb
Start Simulator in start mode instead of menu mode
codcod 0c64504
Add Python client
codcod 4bc4c0b
Update README
codcod 0f88f70
Update README
codcod a70c2b5
chore: clean up dockerization of Simulator
codcod e4c3670
chore: occasional maintenance
codcod 3edf3b2
chore: add examples
codcod fe5dc34
typo
codcod ee6e145
Update README.md
codcod 5524550
Rename README-repository-overview.md to README-docker-hub-repository-…
codcod 3a2ed90
docs: update
codcod bf4c59c
Merge branch 'master' of https://github.com/codcod/opensmpp
codcod File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 @@ | ||
| target |
This file contains hidden or 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,31 @@ | ||
| # The following images also work but produce images twice as big: | ||
| # | ||
| # - FROM maven:3-jdk-11-slim AS builder | ||
| # - FROM openjdk:11 | ||
| # | ||
| # The following can be used on MacOS: | ||
| # | ||
| # FROM --platform=linux/amd64 ibmjava:8-sdk | ||
|
|
||
|
|
||
| FROM maven:3.6-jdk-8-alpine AS builder | ||
|
|
||
| COPY . /app/src | ||
|
|
||
| RUN mvn -f /app/src/pom.xml clean package | ||
|
|
||
| FROM adoptopenjdk/openjdk8 | ||
|
|
||
| COPY --from=builder /app/src/charset/target/opensmpp-charset-3.0.3-SNAPSHOT.jar /app/charset.jar | ||
| COPY --from=builder /app/src/client/target/opensmpp-client-3.0.3-SNAPSHOT.jar /app/client.jar | ||
| COPY --from=builder /app/src/core/target/opensmpp-core-3.0.3-SNAPSHOT.jar /app/core.jar | ||
| COPY --from=builder /app/src/sim/target/opensmpp-sim-3.0.3-SNAPSHOT.jar /app/sim.jar | ||
| COPY sim/users.txt /app/etc/users.txt | ||
|
|
||
| WORKDIR /app | ||
|
|
||
| EXPOSE 2775 | ||
|
|
||
| ENV CLASSPATH=".:charset.jar:client.jar:core.jar:sim.jar" | ||
|
|
||
| ENTRYPOINT ["java", "org.smpp.smscsim.Simulator"] |
This file contains hidden or 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 hidden or 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,6 @@ | ||
| version: '3' | ||
| services: | ||
| simulator: | ||
| build: . | ||
| ports: | ||
| - 2775:2775 |
This file contains hidden or 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 hidden or 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 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| docker build -t opensmpp-sim:3.0.3 . |
This file contains hidden or 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,22 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| # remove all: stopped containers, unused networks, dangling images, build cache | ||
| # docker system prune | ||
|
|
||
| # remove dangling images | ||
|
|
||
| dangling_images='docker images -f dangling=true -q' | ||
|
|
||
| if [ $( $dangling_images |wc -l ) -gt 0 ]; then | ||
| docker rmi $( $dangling_images ) | ||
| printf "* Dangling images have been removed\n" | ||
| fi | ||
|
|
||
| # remove exited containers | ||
|
|
||
| exited_containers='docker ps -a -f status=exited -f status=created -q' | ||
|
|
||
| if [ $( $exited_containers |wc -l ) -gt 0 ]; then | ||
| docker rm $( $exited_containers ) | ||
| printf "* Exited containers have been removed\n" | ||
| fi |
This file contains hidden or 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 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| docker run -p 2775:2775 -it opensmpp-sim:3.0.3 |
This file contains hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a library for an old technology (SMS), and some of its users might be using old JVMs. You can still get commercially supported Java 1.6 and 1.7 JVMs. So we would rather keep support for at least Java 1.6.