Skip to content

Instantly share code, notes, and snippets.

@chrisroane
Created September 1, 2017 18:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrisroane/1f3da21b2fbc33de7d855e1c03713a75 to your computer and use it in GitHub Desktop.
Save chrisroane/1f3da21b2fbc33de7d855e1c03713a75 to your computer and use it in GitHub Desktop.
# Set the base image
FROM ubuntu
# Set config variables.
ENV NVM_DIR /root/.nvm
ENV NODE_VERSION 6.1.0
# Replace shell with bash so we can source files.
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
# Install the PHP extensions we need
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
apt-utils \
php7.0-dev \
bzip2 \
libbz2-dev \
libc-client2007e-dev \
libjpeg-dev \
libkrb5-dev \
libldap2-dev \
libmagickwand-dev \
libmcrypt-dev \
libpng12-dev \
libpq-dev \
libxml2-dev \
php-curl \
xfonts-base \
xfonts-75dpi \
wkhtmltopdf \
libxss1 \
libappindicator1 \
libindicator7 \
xvfb \
unzip \
php-pear \
wget \
python-software-properties \
sudo \
nano \
build-essential \
libssl-dev \
git-all \
apt-transport-https \
ca-certificates \
curl \
software-properties-common \
&& pecl install imagick \
&& pecl install oauth-2.0.2 \
&& mkdir -p /srv/bin
# Install Docker.
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
RUN sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install docker-ce \
&& apt-get -y clean \
&& apt-get -y autoclean \
&& apt-get -y autoremove \
&& cd /srv/bin \
&& rm -rf /var/lib/apt/lists/* && rm -rf && rm -rf /var/lib/cache/* && rm -rf /var/lib/log/* && rm -rf /tmp/*
# Install NVM + Node
RUN curl https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash \
&& . $NVM_DIR/nvm.sh \
&& nvm install $NODE_VERSION \
&& nvm alias default $NODE_VERSION \
&& nvm use default
ENV NODE_PATH $NVM_DIR/v$NODE_VERSION/lib/node_modules
ENV PATH $NVM_DIR/v$NODE_VERSION/bin:$PATH
# Setup medstat.local.
RUN echo 127.0.0.1 medstat.local | tee -a /etc/hosts
# Install Chromedriver
RUN wget --no-check-certificate https://chromedriver.storage.googleapis.com/2.24/chromedriver_linux64.zip
RUN unzip chromedriver_linux64.zip
RUN chmod +x chromedriver
RUN mv -f chromedriver /usr/local/share/chromedriver
RUN ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver
RUN ln -s /usr/local/share/chromedriver /usr/bin/chromedriver
# Install Composer.
RUN curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment