Docker Community Forums

Share and learn in the Docker community.

Docker Build Inside Ant Build

Hi All,

I have an ant build system for the project. which does compile, build and packaging of resources. Now we are migrating to containers. so we have to do an Docker build on the packaged binaries. Is there any known pattern on how to hook Dockerfile build inside the Ant Build?

Also, whenever Docker build fails it returns “1” if it passes it returns image id: xxxxxx322 is there any known pattern on how to iterate docker build output and know whether the result was successful or not?

Here is how the Buid process is expected to work:

  1. Load resources
  2. java Build
  3. c# build
  4. package binaries
  5. Docker build
  6. Docker push
  7. exit