Docker

Docker: Basic Apache2 Container Dockerfile

 

silosix@M6500:~/git/docker$ cat Dockerfile
FROM ubuntu:12.04

MAINTAINER uc

RUN apt-get update && apt-get install -y apache2 && apt-get clean && rm -rf /var/lib/apt/lists/*

ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_LOG_DIR /var/log/apache2

EPOSE 80

Tags

Sed: Search/Replace to edit files inside Docker containers

root@c460eb9bda94:/usr/local/apache2# sed 's/LogLevel warn/LogLevel debug/' conf/httpd.conf > conf/httpd.conf.changed && mv conf/httpd.conf.changed conf/httpd.conf
  1. Search/Replace in  conf/httpd.conf
  2. Pipe to conf/httpd.conf.changed
  3. move conf/httpd.conf.changed to conf/httpd.conf
Tags
Subscribe to Docker