Skip to content

Commit

Permalink
wodby is now default user wodby/php#22
Browse files Browse the repository at this point in the history
  • Loading branch information
coolkei committed Feb 9, 2018
1 parent 6729c68 commit 4e8cba6
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 40 deletions.
19 changes: 8 additions & 11 deletions 5.3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,29 @@ ENV DRUSH_VER="7.4.0" \
PHP_OUTPUT_BUFFERING="16384" \
PHP_REALPATH_CACHE_SIZE="64k" \
PHP_REALPATH_CACHE_TTL="3600" \
PHP_SESSION_AUTO_START="0" \
\
DRUSH_PATCHFILE_URL="https://bitbucket.org/davereid/drush-patchfile.git" \
DRUSH_REGISTRY_REBUILD_URL="https://ftp.drupal.org/files/projects/registry_rebuild-7.x-2.5.tar.gz"
PHP_SESSION_AUTO_START="0"

USER root

RUN set -ex; \
\
# Drush
su-exec www-data composer global require drush/drush:"${DRUSH_VER}"; \
su-exec wodby composer global require drush/drush:"${DRUSH_VER}"; \
\
# Drush extensions
su-exec www-data mkdir -p /home/www-data/.drush; \
su-exec www-data git clone "${DRUSH_PATCHFILE_URL}" /home/www-data/.drush/drush-patchfile; \
wget -qO- "${DRUSH_REGISTRY_REBUILD_URL}" | su-exec www-data tar zx -C /home/www-data/.drush; \
su-exec wodby mkdir -p /home/wodby/.drush; \
drush_patchfile_url="https://bitbucket.org/davereid/drush-patchfile.git"; \
su-exec wodby git clone "${drush_patchfile_url}" /home/wodby/.drush/drush-patchfile; \
\
mv /usr/local/bin/actions.mk /usr/local/bin/php.mk; \
# Change overridden target name to avoid warnings.
sed -i 's/git-checkout:/php-git-checkout:/' /usr/local/bin/php.mk; \
\
# Clean up
su-exec www-data composer clear-cache; \
su-exec www-data drush cc drush
su-exec wodby composer clear-cache; \
su-exec wodby drush cc drush

USER www-data
USER wodby

COPY templates /etc/gotpl/
COPY actions /usr/local/bin
Expand Down
26 changes: 12 additions & 14 deletions 5.6/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,38 +11,36 @@ ENV DRUSH_LAUNCHER_VER="0.5.1" \
PHP_OUTPUT_BUFFERING="16384" \
PHP_REALPATH_CACHE_SIZE="64k" \
PHP_REALPATH_CACHE_TTL="3600" \
PHP_SESSION_AUTO_START="0" \
\
DRUSH_PATCHFILE_URL="https://bitbucket.org/davereid/drush-patchfile.git" \
DRUSH_REGISTRY_REBUILD_URL="https://ftp.drupal.org/files/projects/registry_rebuild-7.x-2.5.tar.gz"
PHP_SESSION_AUTO_START="0"

USER root

RUN set -ex; \
\
# Drush
su-exec www-data composer global require drush/drush; \
su-exec wodby composer global require drush/drush; \
\
# Drush launcher
wget -O drush.phar \
"https://github.com/drush-ops/drush-launcher/releases/download/${DRUSH_LAUNCHER_VER}/drush.phar"; \
drush_launcher_url="https://github.com/drush-ops/drush-launcher/releases/download/${DRUSH_LAUNCHER_VER}/drush.phar"; \
wget -O drush.phar "${drush_launcher_url}"; \
chmod +x drush.phar; \
mv drush.phar /usr/local/bin/drush; \
\
# Drush extensions
su-exec www-data mkdir -p /home/www-data/.drush; \
su-exec www-data git clone "${DRUSH_PATCHFILE_URL}" /home/www-data/.drush/drush-patchfile; \
wget -qO- "${DRUSH_REGISTRY_REBUILD_URL}" | su-exec www-data tar zx -C /home/www-data/.drush; \
su-exec wodby mkdir -p /home/wodby/.drush; \
drush_patchfile_url="https://bitbucket.org/davereid/drush-patchfile.git"; \
su-exec wodby git clone "${drush_patchfile_url}" /home/wodby/.drush/drush-patchfile; \
drush_rr_url="https://ftp.drupal.org/files/projects/registry_rebuild-7.x-2.5.tar.gz"; \
wget -qO- "${drush_rr_url}" | su-exec wodby tar zx -C /home/wodby/.drush; \
\
mv /usr/local/bin/actions.mk /usr/local/bin/php.mk; \
# Change overridden target name to avoid warnings.
sed -i 's/git-checkout:/php-git-checkout:/' /usr/local/bin/php.mk; \
\
# Clean up
su-exec www-data drush cc drush; \
su-exec www-data composer clear-cache
su-exec wodby drush cc drush; \
su-exec wodby composer clear-cache

USER www-data
USER wodby

COPY templates /etc/gotpl/
COPY actions /usr/local/bin
Expand Down
28 changes: 13 additions & 15 deletions 7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,26 @@ FROM wodby/php:${BASE_IMAGE_TAG}
ENV DRUSH_LAUNCHER_VER="0.5.1" \
\
PHP_REALPATH_CACHE_TTL="3600" \
PHP_OUTPUT_BUFFERING="16384" \
\
DRUSH_PATCHFILE_URL="https://bitbucket.org/davereid/drush-patchfile.git" \
DRUSH_REGISTRY_REBUILD_URL="https://ftp.drupal.org/files/projects/registry_rebuild-7.x-2.5.tar.gz"
PHP_OUTPUT_BUFFERING="16384"

USER root

RUN set -ex; \
\
# Drush
su-exec www-data composer global require drush/drush; \
su-exec wodby composer global require drush/drush; \
\
# Drush launcher
wget -O drush.phar \
"https://github.com/drush-ops/drush-launcher/releases/download/${DRUSH_LAUNCHER_VER}/drush.phar"; \
drush_launcher_url="https://github.com/drush-ops/drush-launcher/releases/download/${DRUSH_LAUNCHER_VER}/drush.phar"; \
wget -O drush.phar "${drush_launcher_url}"; \
chmod +x drush.phar; \
mv drush.phar /usr/local/bin/drush; \
\
# Drush extensions
su-exec www-data mkdir -p /home/www-data/.drush; \
su-exec www-data git clone "${DRUSH_PATCHFILE_URL}" /home/www-data/.drush/drush-patchfile; \
wget -qO- "${DRUSH_REGISTRY_REBUILD_URL}" | su-exec www-data tar zx -C /home/www-data/.drush; \
su-exec wodby mkdir -p /home/wodby/.drush; \
drush_patchfile_url="https://bitbucket.org/davereid/drush-patchfile.git"; \
su-exec wodby git clone "${drush_patchfile_url}" /home/wodby/.drush/drush-patchfile; \
drush_rr_url="https://ftp.drupal.org/files/projects/registry_rebuild-7.x-2.5.tar.gz"; \
wget -qO- "${drush_rr_url}" | su-exec wodby tar zx -C /home/wodby/.drush; \
\
# Drupal console
curl https://drupalconsole.com/installer -L -o drupal.phar; \
Expand All @@ -38,14 +36,14 @@ RUN set -ex; \
sed -i 's/git-checkout:/php-git-checkout:/' /usr/local/bin/php.mk; \
\
mkdir -p "${FILES_DIR}/config"; \
chown www-data:www-data "${FILES_DIR}/config"; \
chown wodby:wodby "${FILES_DIR}/config"; \
chmod 775 "${FILES_DIR}/config"; \
\
# Clean up
su-exec www-data composer clear-cache; \
su-exec www-data drush cc drush
su-exec wodby composer clear-cache; \
su-exec wodby drush cc drush

USER www-data
USER wodby

COPY templates /etc/gotpl/
COPY actions /usr/local/bin
Expand Down

0 comments on commit 4e8cba6

Please sign in to comment.