Skip to content

Commit

Permalink
Merge pull request #2 from acseo/feature/rsync
Browse files Browse the repository at this point in the history
deployer v6.6.0 + recipes
  • Loading branch information
hmarin authored Dec 9, 2019
2 parents 995d148 + 93af68b commit a3d1385
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 5 deletions.
18 changes: 13 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,18 @@ FROM php:7-alpine

LABEL maintainer "[email protected]"

RUN curl -LO https://deployer.org/deployer.phar \
&& mv deployer.phar /usr/local/bin/dep \
&& chmod +x /usr/local/bin/dep
RUN curl -LO https://deployer.org/releases/v6.6.0/deployer.phar \
&& mv deployer.phar /usr/local/bin/dep \
&& chmod +x /usr/local/bin/dep

RUN apk --no-cache add openssh-client rsync
RUN apk --no-cache add openssh-client rsync

ENTRYPOINT ["/bin/sh", "-c"]
ENV COMPOSER_HOME=/var/composer
COPY composer-install /tmp/composer-install
RUN chmod +x /tmp/composer-install
RUN /tmp/composer-install && \
rm /tmp/composer-install

RUN composer global require deployer/recipes --dev

ENTRYPOINT ["/bin/sh", "-c"]
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ Docker CI Deployer Image used for ACSEO Deployments with Deployer

# tags history

- v6.6.0 composer to add recipes + rsync recipe
- v6.2.0 symfony4 recipe support
19 changes: 19 additions & 0 deletions composer-install
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env sh

EXPECTED_SIGNATURE=$(wget -q -O - https://composer.github.io/installer.sig)
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
ACTUAL_SIGNATURE=$(php -r "echo hash_file('SHA384', 'composer-setup.php');")

if [ "$EXPECTED_SIGNATURE" != "$ACTUAL_SIGNATURE" ]
then
>&2 echo 'ERROR: Invalid installer signature'
rm composer-setup.php
exit 1
fi

php composer-setup.php --quiet
RESULT=$?
rm composer-setup.php
mv composer.phar /usr/bin/composer && chmod +x /usr/bin/composer

exit ${RESULT}

0 comments on commit a3d1385

Please sign in to comment.