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.

  • Docker, Django and Selenium - Selenium unable to connect
  • Concourse CI will not run Hello-World after setting up with the official docker image. It fails showing “no workers”
  • docker: 'stack' is not a docker command
  • Which file stores the docker image dependencies?
  • What happen to docker volume on deletion of container
  • Docker - Fail to run container from imported image with entrypoint
  • 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?

  • Access docker containers from local network via dev suffix
  • Webpack, core, docker: building webpack with dotnet debug or release build
  • How to configure GWT debugging with docker?
  • How to tag a image(.tar) file of docker(container) while loading into other host?
  • how to mount an efs file system using docker in beanstalk
  • Unable to Launch Node.js Application Inside Built Docker Container
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.