nginx - Managing docker image throw systemctl -


i built docker image containing nginx configuration lets call when build manually building , running no errors when decided manage docker image throw systemctl it's giving me no errors either when type: sudo systemctl status a. service it's inactive(dead)

here nginx.service file

here output given when managed throw systemctl

what can make active on startup? in advance

you can't kill non existing container 1 on execstartpre field. can first : check if container running , kill if needed. think it's complicated.

if have recent docker version (> 1.10), prefer restart policies : https://docs.docker.com/engine/admin/start-containers-automatically/

docker run --restart mynginx 

Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -