POC - Store config files for docker containers.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

The question is: "how to containerize an application in such a way that
it allows the end user to customize configuration files?".
Another question: how to containerize application for multiple environments?

We have some ways to do this: create two different Dockerfiles for each
environment, use environment variables, generate config files on the fly
, using templates, etc.
Another way - using Docker mounted volumes:  bind mount a volume from
the host into the container.

How to create container and how to create config files?

For POC I use nginx application. I updated nginx spec file and separate
nginx.rpm on two different rpm files: nginx-data and nginx. nginx.rpm
consists of the application files, nginx-data.rpm consists of config
files and html files. nginx-data.rpm will be install to the host.
nginx.rpm will be install into the container. For containerization of
the nginx.rpm created Dockerfile to build nginx image with the nginx.rpm
file. This image stored in the docker-nginx.rpm file.

Installation

# rpm -ivh
http://overbits.org/docker/releases/22/x86_64/os/overbits-org-docker-release-1-2.fc22.x86_64.rpm
# dnf install docker-nginx
# systemctl start nginx

docker-nginx rpm package install docker nginx image. nginx config files
(/etc/nginx) and html files (/usr/share/nginx) install to host. nginx
application will install in the nginx docker image. Install systemd
nginx.service file. On call systemctl start nginx create new container
to run nginx service.

Source code, spec files, jenkins jobs, etc: http://overbits.org/cgit

Thank you.

--
Oleg Gashev




--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux