Skip to content

Instantly share code, notes, and snippets.

@otarza
Created October 18, 2016 09:42
Show Gist options
  • Save otarza/1d501e3009ab35e5279d87107dd41e0d to your computer and use it in GitHub Desktop.
Save otarza/1d501e3009ab35e5279d87107dd41e0d to your computer and use it in GitHub Desktop.
FROM andrewholgate/drupal-php70-dev:0.5.3
MAINTAINER Andrew Holgate <andrewholgate@yahoo.com>
RUN DEBIAN_FRONTEND=noninteractive apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get -y upgrade
# Project specific PHP dependencies.
# Install html-auditor module
RUN npm install -g html-auditor
RUN sed -i "389ienv[PATH] = /usr/local/bin:/usr/bin:/bin:$(npm bin -g)" /etc/php/7.0/fpm/pool.d/www.conf
# Copy over project specific setup script
COPY setup.sh /usr/local/bin/setup
RUN chmod +x /usr/local/bin/setup
RUN apt-get -y install zsh
RUN wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sudo zsh
RUN /bin/zsh
# Clean-up installation.
RUN DEBIAN_FRONTEND=noninteractive apt-get -y autoclean && \
DEBIAN_FRONTEND=noninteractive apt-get -y autoremove
# Apache does not like PID files pre-existing
RUN rm -f /var/run/apache2/apache2.pid
RUN service apache2 restart
RUN service php7.0-fpm start
ENTRYPOINT ["/usr/local/bin/setup"]
CMD ["/usr/local/bin/run"]
@otarza
Copy link
Author

otarza commented Oct 18, 2016

#!/bin/bash
set -e

## Setup project symlinks.
#sudo rm -Rf /var/www/html
#sudo ln -s /var/www/project/repo/web /var/www/current
#sudo ln -s /var/www/current /var/www/html
#sudo chown -R ubuntu:www-data /var/www/html /var/www/current

## Add SSH keys to SSH agent
#eval "$(ssh-agent -s)"
#ssh-add ~/.ssh/id_rsa

## Change permissions to config and SSH key as needed.
#chown ubuntu:ubuntu ~/.ssh/config

# Add git user configs
#git config --global user.email "name@example.com"
#git config --global user.name "Name Surname"

exec "$@"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment