browsersilikon.blogg.se

Docker run image with multiple port
Docker run image with multiple port








docker run image with multiple port

its a slightly simpler version of the image we created for the bank account service above. Next, we'll define the config service docker image. Script, followed by the bank account service.

docker run image with multiple port

wait & java -jar bank-account-service-0.0.1-snapshot.jar i'll explain the purpose of theĬopy /target/bank-account-service-0.0.1-snapshot.jar /app/Ĭopies the service jar from the target directory on the host to theĬmd. all further commands will run from this directory.ĭirectory in the image. Tells docker to create a new working directory in the image called.

docker run image with multiple port

Tells docker to use the openjdk base image. We'll begin defining a docker image for the bank account service. if you want more info you can check out this previous I've created a sample app for this post which you can pull fromīank account service - exposes a rest api for creating and reading bank simple account detailsĬonfig service - exposes a rest api with application configuration for the bank account serviceĢ dockerfiles - to define the container images for the above servicesĪ docker compose file defining the multi-container applicationĪside from the docker side of things, i won't go into any detail on the boot services. you can start and stop all containers in the application with a single command. however, as the number of containers in your application grows, it becomes more cumbersome to manage each container manually.ĭocker compose simplifies things by allowing you to configure a multi-container application in a single yaml file. you can do this just fine by manually starting and stopping the containers yourself, as shown previously in this In this post, we'll look at how docker compose makes it easier to configure and run multiple containers in your local environment.įirst up, you don't need docker compose to run multiple containers.










Docker run image with multiple port