1. Hello Folks,
    Que1) Added dockerfile: Dockerfile-build in docker-compose.yml and run docker-compose build
    Getting ERROR: Cannot locate specified Dockerfile: Dockerfile-build and application is not getting up

    Que2) I revert above change in docker-compose.yml and run docker-compose up. Application is getting UP but not running in container.
    Appreciate Any Help!!

  2. Author

    Take into account that, when you scale up the instances, they will take randomly-assigned ports to expose outside. In the Testing section, you’ll find how to list the instances to find the ports and then connect. I hope this helps.

  3. Hi, i’m still new to docker and containerisation. I don’t understand why building in the docker container would be such a bad thing. isnt the entire purpose to abstract the environment so you can focus on code. In my opinion, by putting the build stage in the docker, it removes an extra step where errors might occur due to lib mismatch, for instance java versions or whatever. the docker build will always produce the same thing, be it production or dev env.

    1. Author

      It isn’t a bad thing, it makes sense in some situations as I tried to explain in the blog post. But if you keep your projects simple and use tools like Maven or Gradle, you shouldn’t need Docker to build your app on your development machine. In those cases, that responsibility is better placed directly at the CI/CD tool side (say Jenkins, Travis, etc.).


This site uses Akismet to reduce spam. Learn how your comment data is processed.