-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
72 lines (61 loc) · 1.6 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
63
64
65
66
67
68
69
70
71
72
FROM ruby:2.7.2-slim-buster AS builder
FROM debian:buster-slim
LABEL maintainer="ixkaito <[email protected]>"
LABEL version="2.0"
RUN apt-get update; \
apt-get clean; \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ca-certificates \
curl \
less \
lftp \
libyaml-0-2 \
mariadb-client \
mariadb-server \
nano \
openssh-client \
sshpass \
; \
rm -rf /var/lib/apt/lists/*
ENV BIN=/usr/local/bin
#
# Copy Ruby and Gem binary
#
COPY --from=builder /usr/local/lib/ /usr/local/lib/
COPY --from=builder /usr/local/bin/ruby ${BIN}/ruby
COPY --from=builder /usr/local/bin/gem ${BIN}/gem
#
# Install Gems
#
RUN gem install wordmove --no-document
#
# Install WP-CLI
#
RUN curl -o ${BIN}/wp -L https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar; \
chmod +x ${BIN}/wp
#
# Install PHPUnit
#
RUN curl -o ${BIN}/phpunit -L https://phar.phpunit.de/phpunit.phar; \
chmod +x ${BIN}/phpunit
#
# Install Mailhog
#
RUN curl -o ${BIN}/mailhog -L https://github.com/mailhog/MailHog/releases/download/v1.0.0/MailHog_linux_amd64; \
chmod +x ${BIN}/mailhog
#
# Xdebug settings
#
COPY xdebug.ini /etc/php/7.3/cli/conf.d/20-xdebug.ini
#
# Setting lftp for wordmove via ftp
#
RUN echo "set ssl:verify-certificate no" >> ~/.lftp.rc
#
# Creating document root directory, adding wocker user, and MariaDB settings
#
ENV DOCROOT=/var/www/wordpress
RUN mkdir -p ${DOCROOT}; \
adduser --uid 1000 --gecos '' --disabled-password wocker; \
sed -i -e "s/^bind-address.*/bind-address = 0.0.0.0/" /etc/mysql/mariadb.conf.d/50-server.cnf
COPY wp-cli.yml /var/www