Sign inSign up

q409640976/docker-cron

By q409640976

•Updated over 6 years ago

Image
0

988

q409640976/docker-cron repository overview

⁠Setting up a cron in docker

⁠Build Docker image

docker build -t docker-cron .

⁠Initiate the container

docker run -p 8080:8080 docker-cron

⁠Test the cron output
  • Copy the container id from the output of this command
    docker ps | grep docker-cron

  • Login to the docker container using the container_id
    docker exec -it <container_id> /bin/bash
    Example: docker exec -it bc8a9bbfbba9 /bin/bash

Note: Try running above commands using sudo if you get Permission Denied Error.
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.39/containers/json: dial unix /var/run/docker.sock: connect: permission denied

Tag summary

Content type

Image

Digest

Size

45.7 MB

Last updated

over 6 years ago

docker pull q409640976/docker-cron