Answer the question
In order to leave comments, you need to log in
How to add service autostart inside docker container?
Good afternoon. I decided to study docker, which is fashionable now, and came up with a little problem for myself. The essence of the problem is that you need to periodically run a Bash script that will download data, convert and generate results in the form of html that you need to give out. In fact, I need a container with Apache installed, which will run my script every hour. I took the basic container with Ubuntu, launched it in interactive mode and installed Apache in it, set up the script launch via cron - everything is ok. Then he tried to create his own modified container using the Dockerfile and failed already at the Apache autorun stage.
# Version: 0.0.1
FROM ubuntu:14.04
RUN apt-get update && apt-get install -y apache2
EXPOSE 80
docker run -d -p 9999:80 my/image
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question