forked from simonbland/docker-wordmove
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Dockerfile
64 lines (50 loc) · 1.73 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
#
# Wordmove Dockerfile
#
# Pull base image.
FROM ruby:2.7-slim
LABEL maintainers.1="Simon Bland <[email protected]>"
LABEL maintainers.2="Alessandro Fazzi <[email protected]>"
ENV DEBIAN_FRONTEND noninteractive
ENV WORDMOVE_WORKDIR /html
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
COPY mount-ssh.sh /bin/mount-ssh.sh
RUN chmod +x /bin/mount-ssh.sh
# hadolint ignore=DL3008
RUN apt-get update && apt-get install -y --no-install-recommends \
openssh-server \
curl \
rsync \
mariadb-client \
lftp \
lsb-release \
apt-transport-https \
ca-certificates \
wget \
git \
ruby-dev \
build-essential \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# hadolint ignore=DL3008
RUN apt-get update && apt-get install -y --no-install-recommends locales \
&& apt-get clean \
&& rm -r /var/lib/apt/lists/* \
&& sed -i 's/^# *\(en_US.UTF-8\)/\1/' /etc/locale.gen \
&& locale-gen \
&& echo "export LC_ALL=en_US.UTF-8" >> ~/.bashrc \
&& echo "export LANG=en_US.UTF-8" >> ~/.bashrc \
&& echo "export LANGUAGE=en_US.UTF-8" >> ~/.bashrc \
&& echo "eval \`ssh-agent -s\`" >> ~/.bashrc
# hadolint ignore=DL3008
RUN wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg \
&& echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/php.list \
&& apt-get update && apt-get -y --no-install-recommends install php7.4-cli php7.4-mysql \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN gem install wordmove --version 5.2.2
RUN wget -O /usr/local/bin/wp -L https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar \
&& chmod +x /usr/local/bin/wp
WORKDIR ${WORDMOVE_WORKDIR}
ENTRYPOINT ["/bin/mount-ssh.sh"]
CMD ["/bin/bash", "-l"]