Sign inSign up

kaustubh5/httpd

By kaustubh5

•Updated over 10 years ago

httpd image on centod 6.8

Image
0

1.1K

kaustubh5/httpd repository overview

How to use it:

⁠Pull the image:

# docker pull kaustubh5/httpd

# docker run -t -d -i -p 80:80 --name <name of your container> kaustubh5/httpd

⁠To check the running docker Container

# docker ps

⁠To login to container shell:

# docker exec -it httpdtest bash

⁠Dockerfile used:

== FROM docker.io/centos:6.8 MAINTAINER http://www.centos.org⁠ LABEL Vendor="CentOS" LABEL License=GPLv2 LABEL Version=2.4.6-31

RUN yum -y update && yum clean all RUN yum -y install httpd && yum clean all

EXPOSE 80

# Simple startup script to avoid some issues observed with container restart ADD run-httpd.sh /run-httpd.sh RUN chmod -v +x /run-httpd.sh CMD ["/run-httpd.sh"]

⁠File run-httpd.sh

== `#!/bin/bash

# Make sure we're not confused by old, incompletely-shutdown httpd # context after restarting the container. httpd won't start correctly # if it thinks it is already running.

rm -rf /run/httpd/* /tmp/httpd* exec /usr/sbin/apachectl -DFOREGROUND

Tag summary

Content type

Image

Digest

Size

102.6 MB

Last updated

over 10 years ago

docker pull kaustubh5/httpd