-
Notifications
You must be signed in to change notification settings - Fork 22
/
Dockerfile
62 lines (53 loc) · 1.18 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#
# Dockerfile for WordPress
#
FROM appsvcorg/alpine-php-mysql:0.1
MAINTAINER Azure App Service Container Images <[email protected]>
# ========
# ENV vars
# ========
# wordpress
ENV WORDPRESS_SOURCE "/usr/src/wordpress"
ENV WORDPRESS_HOME "/home/site/wwwroot"
#
ENV DOCKER_BUILD_HOME "/dockerbuild"
# ====================
# Download and Install
# ~. tools
# 1. redis
# 2. wordpress
# ====================
WORKDIR $DOCKER_BUILD_HOME
RUN set -ex \
# --------
# 1. redis
# --------
&& apk add --update redis \
# ------------
# 2. wordpress
# ------------
&& mkdir -p $WORDPRESS_SOURCE \
# cp in final
# ----------
# ~. clean up
# ----------
&& rm -rf /var/cache/apk/*
# =========
# Configure
# =========
# httpd confs
COPY httpd-wordpress.conf $HTTPD_CONF_DIR/
RUN set -ex \
##
&& ln -s $WORDPRESS_HOME /var/www/wordpress \
##
&& test -e /usr/local/bin/entrypoint.sh && mv /usr/local/bin/entrypoint.sh /usr/local/bin/entrypoint.bak
# =====
# final
# =====
COPY wp.tar.gz $WORDPRESS_SOURCE/
COPY wp-config.php $WORDPRESS_SOURCE/
COPY entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/entrypoint.sh
EXPOSE 2222 80
ENTRYPOINT ["entrypoint.sh"]