crontab-ui icon indicating copy to clipboard operation
crontab-ui copied to clipboard

Stop docker container services on host with crontab-ui

Open tlgklbr opened this issue 2 years ago • 1 comments

Hi, I have installed with docker compose file for crontab-ui. I want to stop other docker services on the same machine with a job like "docker stop [machine_name]", but I couldn't understand how crontab-ui will interfere with the cronjob file on the host machine. I've read many documents but couldn't find a solution.

For example, even when I create it as follows, it cannot interfere with the cronjob file on the host machine.

docker run -d -p 8000:8000 -v /etc/cron.d:/etc/crontabs alseambusher/crontab-ui

Do I need to type a path into the "Environment Variables" field in the crontab-ui web interface? If yes, which path should I specify?

Can you help me?

tlgklbr avatar Mar 13 '22 13:03 tlgklbr

To do this you need:

  • docker-CLI in the crontab-UI container by installing docker inside the container with -> # apk add docker but if you killed the container you have to install docker every time !, so you have to add docker to the DOCKEFILE & build your own IMAGE:
  • git clone https://github.com/alseambusher/crontab-ui.git
  • cd crontab-ui
  • vim Dockerfile & add docker to the end of "RUN apk --no-cache add" like:

image

  • docker build -t alseambusher/crontab-ui .
  • run & interface the crontab-UI container with the docker daemon of the host-machine by adding -v /var/run/docker.sock:/var/run/docker.sock:
  • docker run -v /var/run/docker.sock:/var/run/docker.sock -d -p 8000:8000 alseambusher/crontab-ui

/////////////////////////////////////////////////////////////////////////////////////////////////////////// OR you can use the image I already built: oxismailxo/crontab-ui

  • docker run -v /var/run/docker.sock:/var/run/docker.sock -d -p 8000:8000 oxismailxo/crontab-ui

Good luck friend :)

oxismailxo avatar Apr 06 '22 03:04 oxismailxo

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 01 '22 15:09 stale[bot]