How to periodically run a script inside a fresh Docker container on Amazon AWS?

I have a Docker image for a web app which needs a specific script to be run once a day. The web app is going to be deployed to a web tier in Elastic Beanstalk. What would be the best way to create a container for this image in order to run the script and then remove this container?

Ideally, I’d like to have some easy way to do the following every 24 hours: Create a worker environment in Elastic Beanstalk with a new Docker container, run the script and remove the worker environment. But this doesn’t seem possible.

  • Trying to find reason for 500 error when running a Django site in Nginx
  • Correct way to deploy WAR files in docker image
  • How to bootstrap a docker container?
  • repair command in mongodb in docker container
  • how to build docker containers for different modules
  • What Docker base image (`FROM`) for Java Spring Boot?
  • I’ve found a few services in AWS that might help (Simple Workflow, OpsWorks, Data Pipeline), but seem massively complicated for what I want.

    Any suggestions?

  • Docker 1.12 reads old line from yml file “volumes” instead of new one
  • Error while cleaning images from docker
  • Can't connect to MySQL docker container launched via ansible
  • VMWare VIC (Photon OS + Docker) vs CoreOS + Docker
  • Benefits of deploying .NET Core App as a Dockerized Container?
  • Can one Java installation on host manage multiple applications deployed in docker container
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.