-
-
Save Inkimar/f9d5e090c0d19a444b0a68ff7fc2a7bd to your computer and use it in GitHub Desktop.
Resource: | |
https://planet.jboss.org/post/deploy_to_wildfly_using_jboss_cli_tech_tip_11 | |
bin/jboss-cli.sh --connect --command="deploy target/javaee7-1.0-SNAPSHOT.war --force" | |
My Effort: | |
I want to run the above command like this (docker excec ) | |
docker exec betanaturalist sh -c 'exec bin/jboss-cli.sh --connect ' | |
this one works:
docker exec betanaturalist sh -c "exec bin/jboss-cli.sh --connect deployment-info"
this one does not work
docker exec betanaturalist sh -c "exec bin/jboss-cli.sh --connect undeploy naturalist.war"
this one does not work
docker exec betanaturalist sh -c "exec bin/jboss-cli.sh --connect deploy /tmp/naturalist.war --force"
OpenJDK 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0
'/tmp/naturalist.war' is assumed to be a command(s) but the commands to execute have been specified by another argument: [deploy]
this one does not work
docker exec betanaturalist sh -c "exec bin/jboss-cli.sh --connect --command 'ls deployment'"
OpenJDK 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0
'ls deployment' is assumed to be a command(s) but the commands to execute have been specified by another argument: [--command]
THIS ONE WORKS
docker exec betanaturalist sh -c "exec bin/jboss-cli.sh --connect --command='ls deployment'"
deploy jar
login-naturalist:
docker exec -it betanaturalist bash
naturalist-copy:
docker cp ../artifact/naturalist.war betanaturalist:/tmp
naturalist-check-deployments:
docker exec betanaturalist sh -c "exec bin/jboss-cli.sh --connect --command='ls deployment'"
naturalist-undeploy:
docker exec betanaturalist sh -c "exec bin/jboss-cli.sh --connect --command='undeploy naturalist.war'"
naturalist-deploy:
docker exec betanaturalist sh -c "exec bin/jboss-cli.sh --connect --command='deploy /tmp/naturalist.war'"
docker exec betanaturalist sh -c "exec bin/jboss-cli.sh --connect ls deployment"