Build Apache Docker Image from Alpine: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
(Created page with "== Good to Know == <syntaxhighlight lang="bash"> # filter and remove docker images, containers docker rm $(docker ps --all -q -f status=dead) docker rmi $(docker images -qa -...")
 
Line 14: Line 14:


# alpine linux install packages
# alpine linux install packages
apk add apache2-ctl --no-cache
apk add apache2 php5-apache2
apk add apache2 php5-apache2
apk add openrc --no-cache
apk add openrc --no-cache
Line 23: Line 24:
rc-status --manual
rc-status --manual
rc-status --list
rc-status --list
# configuration check
apachectl -t
</syntaxhighlight>
</syntaxhighlight>


==References==
==References==
* [https://wiki.alpinelinux.org/wiki/Setting_Up_Apache_with_PHP Setting Up Apache with PHP]
* [https://wiki.alpinelinux.org/wiki/Setting_Up_Apache_with_PHP Setting Up Apache with PHP]

Revision as of 03:14, 25 August 2018

Good to Know

# filter and remove docker images, containers 
docker rm $(docker ps --all -q -f status=dead)
docker rmi $(docker images -qa -f 'dangling=true')
docker rm alpine && docker rmi alpine:3.8

# docker container debug, checking history & service
docker run --name='alpine' -it alpine:3.8
docker exec -it alpine /bin/bash
docker exec -it alpine bash
docker history alpine:3.8
docker logs alpine

# alpine linux install packages
apk add apache2-ctl --no-cache
apk add apache2 php5-apache2
apk add openrc --no-cache

# alpine linux services
rc-service apache2 start
rc-update add apache2
rc-status --crashed
rc-status --manual
rc-status --list

# configuration check
apachectl -t

References