Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
[root@puppetmaster hw]# docker run -it nigel1 /bin/bash
/usr/sbin/apache2ctl: 87: ulimit: error setting limit (Operation not permitted)
Setting ulimit failed. See README.Debian for more information.
Usage: /usr/sbin/apache2 [-D name] [-d directory] [-f file]
[-C "directive"] [-c "directive"]
[-k start|restart|graceful|graceful-stop|stop]
[-v] [-V] [-h] [-l] [-L] [-t] [-T] [-S] [-X]
Options:
-D name : define a name for use in <IfDefine name> directives
-d directory : specify an alternate initial ServerRoot
-f file : specify an alternate ServerConfigFile
-C "directive" : process directive before reading config files
-c "directive" : process directive after reading config files
-e level : show startup errors of level (see LogLevel)
-E file : log startup errors to file
-v : show version number
-V : show compile settings
-h : list available command line options (this page)
-l : list compiled in modules
-L : list available configuration directives
-t -D DUMP_VHOSTS : show parsed vhost settings
-t -D DUMP_RUN_CFG : show parsed run settings
-S : a synonym for -t -D DUMP_VHOSTS -D DUMP_RUN_CFG
-t -D DUMP_MODULES : show all loaded modules
-M : a synonym for -t -D DUMP_MODULES
-t : run syntax check for config files
-T : start without DocumentRoot(s) check
-X : debug mode (only one worker, do not detach)
[root@puppetmaster hw]#
Post the Dockerfile when you get home.
I don't believe the "FROM ubuntu:15.04" in it is correct.
And there may be some other stuff missing from your post.
I checked PluralSite but was unwilling to sign up.
Apache is dead easy on Docker.
I did a pull of ubuntu's official image and I only get
DISTRIB_DESCRIPTION="Ubuntu 14.04.2 LTS"
You post the Dockerfile and I can troubleshoot it further.
haha, actually I just re-produced the problem at work. But this one includes a proxy.
I did some web search and seems "FROM ubuntu:15.04" syntax is correct.
Here's the updated Dockerfile and "docker image" output.
--------------------------------
FROM ubuntu:15.04
vi /dbuilds/apache2/Dockerfile # I used these to build and run the image/container.
FROM ubuntu:15.04
RUN apt-get update && apt-get install -y iputils-ping apache2
ENV var1=Nigel var2=Poulton
EXPOSE 80
ENTRYPOINT ["/usr/sbin/apache2ctl","-DFOREGROUND"]
Built is using
Code:
docker build -t="nigel1:vJJ" .
ran it:
Code:
docker run -it -d --name LQRocks aeaa40ae6938
Verified it's running:
Code:
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
4a2bcb907510 aeaa40ae6938:latest "/usr/sbin/apache2ct 35 seconds ago Up 34 seconds 80/tcp LQRocks
Verified the docker logs for the container:
Code:
docker logs 4a2bcb907510
spits out
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.12. Set the 'ServerName' directive globally to suppress this message
a non-fatal error and easily correctable.
That's all I have, for now.
Is the purpose of this course you taking, has the theme of the current instruction center around debugging?
Because without an EXPOSE directive to open the port, it was doomed to fail.
Also
apache2ctl has to run in the foreground for the container to have a writable state.
I modified the Dockerfile with EXPOSE and your ENTRYPOINT. It's somewhat running without "/bin/bash"
Are you running all this on a Ubuntu or CentOS server? Can it cause trouble if I try to run Ubuntu Docker image on a CentOS server?
Ubuntu 15.04/vivid Desktop 64 bit Virtualbox guest.
Quote:
Originally Posted by sndlt
Thanks a lot for your time and effort to try and solve this.
No worries. It's sorta mostly basic stuff and that's all I know atm, the basics.
Quote:
Originally Posted by sndlt
(You must be very smart and also popular at wherever you work).
What I don't know could fill a warehouse,
What I do know could fill an outhouse.
Not that smart. I make plenty of mistakes, believe you me.
The key is fixing more than I break.
If you get in a spot just shoot me an IM/PM here and ask me to take a look. I usually have enough time
to do a build and step through something.
I did 3 docker HOWTOs over here...
Nothing fancy, I just wanted a feel for it, and those are the results.
Peace out!
PS. If you want bash to run in the container, use
Code:
ENTRYPOINT ["/bin/bash"]
or even a
CMD directive using
Code:
CMD "/bin/bash"
or a slight (syntax) variation, eg: something like that.
But if you run /bin/bash, and you enter the container, you have to detach from it for the container to stay running.
Since bash is the command holding the container 'open', you have to detach, not 'exit'.
No, I do not. No puppet, no chef, no ansible.
Doesn't mean I won't need those skills, as we are a Managed Service Provider and our flagship product (AppLogic) is EOL at the end of June.
So, things are about to get interesting where I work.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.