forked from fabeat/php-deployer
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
32 lines (22 loc) · 1005 Bytes
/
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
ARG PHP_VERSION=7.4
ARG DEPLOYER_VERSION=6.8.0
FROM php:$PHP_VERSION-alpine
LABEL maintainer="[email protected]"
# ENV DEPLOYER_VERSION=$DEPLOYER_VERSION
RUN apk update --no-cache \
&& apk add --no-cache \
bash \
openssh-client \
rsync \
git zip
# https://github.com/deployphp/deployer/releases/download/v7.0.0/deployer.phar
# https://deployer.org/releases/v$DEPLOYER_VERSION/deployer.phar
RUN curl -LO https://github.com/deployphp/deployer/releases/download/v$DEPLOYER_VERSION/deployer.phar \
&& mv deployer.phar /usr/local/bin/dep \
&& chmod +x /usr/local/bin/dep
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# Change default shell to bash (needed for conveniently adding an ssh key)
RUN sed -i -e "s/bin\/ash/bin\/bash/" /etc/passwd
COPY ssh-deactivate-key-checking ssh-start-entrypoint ssh-add-known-host /bin/
ENV LC_ALL=en_US.UTF-8
ENTRYPOINT ["ssh-start-entrypoint"]