-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
46 lines (39 loc) · 1 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
## pull base image
FROM alpine:3.3
## copy modified PHP files into container
COPY . /pimf-blog
## set working directory
WORKDIR /pimf-blog
# get packages
RUN apk update && \
apk upgrade && \
apk add tzdata && \
apk add php-fpm && \
apk add php-common && \
apk add php-bcmath && \
apk add php-ctype && \
apk add php-curl && \
apk add php-dom && \
apk add php-json && \
apk add php-openssl && \
apk add php-pdo && \
apk add php-pdo_sqlite && \
apk add php-pdo_mysql && \
apk add php-cli && \
apk add php-phar && \
apk add php-pcntl && \
apk add php-intl && \
apk add php-zlib && \
apk add openssh && \
apk add openssl && \
apk add supervisor && \
apk del tzdata && \
rm -rf /var/cache/apk/*
# initialize the PIMF application
RUN php pimf core:init
# create blog database if not exists
RUN php pimf blog:create_blog_table
# expose the external port
EXPOSE 1337
# run the PHP's built-in web server
ENTRYPOINT php -S 0.0.0.0:1337