You misunderstand me and my background (I have done development work in
the past, actually - and work for a software company).
sudo zypper in docker
sudo systemctl start docker
Then use docker to pull the apache image:
docker pull httpd:alpine
docker run -dit --name <containername> -p 8082:80 -v <localpath>:/usr/
local/apache2/htdocs --restart=always <imagename>
Then just put stuff in the local path you specify in the -v parameter.
Done - that’s all there is to it. No Linux expertise needed. You can
literally have it running in less than 5 minutes with zero experience in
configuring the apache httpd server.
Do you need to perhaps read a little bit for something more like LAMP?
Sure, because LAMP is not a simple infrastructure to set up in general.
That said, a:
docker search lamp
Turns up a number of pre-configured docker containers. Checking them out
in the docker registry first can give you an idea of how much work it is
to get up and running.
You don’t need a very beefy machine for a single-container setup like
that. I use Virtualization every day (both in the cloud and on local
systems - containers and VirtualBox VMs).
The overhead for using docker is negligible - yes, if you need a ‘beefy’
setup, you need a host with enough memory. The beauty of a docker
container is that there is no configuration necessary for something like
a standard LAMP stack. All it takes is literally just following the
container provider’s instructions on how to set up the volumes that are
shared with the container (that’s the ‘-v’ parameter).
Developers shouldn’t be afraid to learn something new once in a while.
The ones I know and work with aren’t - and they see the benefits of
containerized development. Makes having multiple versions of things a
snap, and it’s easy to deal with and set up.
I was initially apprehensive about using Dockerfiles (which is a slightly
more advanced usage of docker - and can become much more complex) - but
what you’re looking for is a truly simple setup, and it’s a great choice
for that because you don’t have to build the images at all.
And what you get is more than an isolated environment with low overhead -
you get reproducability. If you do muck around inside the container
(which you can do - launching a shell is an easy ‘docker exec -it
<containername> /bin/bash’ away), you can recreate the container by just
re-running the ‘run’ command.
Look into it - you’ll see that it’s not as difficult as you’re making it
out to be.
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C