What are the best practices to deploy and host artifacts for a Docker Multicontainer environment in Elasticbeanstalk for Scala Apps?
If you're willing to use a different SBT plugin for step 1, then you can automate step 2.
Although quay.io supports building your image from GitHub, they do not require it. (You can publish a local Docker image directly to your quay.io repository.)
- Use the sbt-native-packager plugin in project/plugins.sbt.
- Setup the plugin settings in build.sbt, like:
dockerRespository := Some("quay.io/myaccount")
- Your step 1 becomes:
sbt docker:stage
- Followed by:
sbt docker:publishLocal
- Check your image names and tags with
docker images
. The new image should have a name likequay.io/myaccount/app
- Before you can publish to quay.io, you must
docker login quay.io
. Read their tutorial. - Your step 2 becomes
sbt docker:publish
. Now your quay.io account should contain the same IMAGE ID as your local Docker daemon.
Proceed with steps 3+ on the AWS side...
I am not really familiar with Scala however I believe the artifacts could be generated by Jenkins/CircleCI inside of your container that is built on Jenkins/CircleCI then the appropriate image tags referenced within your Dockerrun.aws.json.
Hope that helps.