Build Apache Docker Image from Alpine: Difference between revisions
Jump to navigation
Jump to search
Line 17: | Line 17: | ||
apk add apache2-ctl --no-cache | apk add apache2-ctl --no-cache | ||
apk add openjdk8 --no-cache | apk add openjdk8 --no-cache | ||
apk add php5-cli --no-cache | |||
apk add openrc --no-cache | apk add openrc --no-cache | ||
apk add wget --no-cache | apk add wget --no-cache | ||
apk add vim --no-cache | apk add vim --no-cache | ||
# alpine linux uninstall packages | |||
apk del php5-cli | |||
# alpine linux services | # alpine linux services |
Revision as of 04:17, 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 php5-apache2 --no-cache
apk add apache2-ctl --no-cache
apk add openjdk8 --no-cache
apk add php5-cli --no-cache
apk add openrc --no-cache
apk add wget --no-cache
apk add vim --no-cache
# alpine linux uninstall packages
apk del php5-cli
# alpine linux services
rc-service apache2 start
rc-update add apache2
rc-status --crashed
rc-status --manual
rc-status --list
# configuration of environment variables
export JAVA_HOME=/usr/lib/jvm/java-1.8-openjdk
export JRE_HOME=$JAVA_HOME/jre
export PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
# configuration check
apachectl -t
httpd -t