official-images | Primary source of truth for the Docker `` Official Images | Continuous Deployment library
kandi X-RAY | official-images Summary
kandi X-RAY | official-images Summary
Primary source of truth for the Docker "Official Images" program
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of official-images
official-images Key Features
official-images Examples and Code Snippets
Community Discussions
Trending Discussions on official-images
QUESTION
I'd like to run govc
commands in a Jenkins pipeline. Running the govc
container manually works:
docker pull vmware/govc && docker run -e GOVC_USERNAME=$GOVC_USERNAME -e GOVC_PASSWORD=$GOVC_PASSWORD -e GOVC_INSECURE=$GOVC_INSECURE vmware/govc find -u=$GOVC_URL / -type m
For some reason the short environment variable passing version (-e ENV_VAR
) doesn't work with this image and I must enter GOVC_URL as a govc
argument, but besides these the command returns the right output.
This is the pipeline I wrote for the command:
...ANSWER
Answered 2020-May-04 at 09:24As Zeitounator pointed out, the issue is the way Jenkins handles containers that use ENTRYPOINT
, so I switched to sh
steps:
QUESTION
Is it possible to run Gretty projects in Docker Gradle container?
Normally the Gretty task tomcatRun
starts Tomcat app server and you can browse the app at http://localhost:8080/app-name. With Docker Gradle image the task is successfully started but the container is terminated immediately after that.
Steps for reproducing the issue:
- Install Docker.
- Clone https://github.com/haba713/hello_gretty.
cd hello_gretty
- Install Gradle wrapper:
docker run --rm -u gradle -v "$PWD":/home/gradle/project -w /home/gradle/project gradle gradle wrapper
- Run the task
tomcatRun
:./gradlew tomcatRun
- Browse http://localhost:8080/hello_gretty.
- Terminate the task by pressing enter in terminal.
- Run task
tomcatRun
with Gradle Docker image:docker run --rm -u gradle -p 8080:8080 -v "$PWD":/home/gradle/project -w /home/gradle/project gradle gradle tomcatRun
- The task
tomcatRun
is started (takes some time) but for some reason the container terminates immediately after that. Maybe the task was completed without pressing any key.
I also created a Docker issue about the problem.
...ANSWER
Answered 2020-Jan-26 at 17:04Adding -t
or --tty
to docker
command keeps Tomcat running. Also add -i
or --interactive
if you want to stop Tomcat with "any key" as Gretty says: "Press any key to stop the server."
docker run --rm -u gradle -it -p 8080:8080 -v "$PWD":/home/gradle/project -w /home/gradle/project gradle gradle tomcatRun
Thank you David Maze for helping.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install official-images
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page