forked from tomav/docker-behat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
35 lines (27 loc) · 968 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
33
34
35
FROM ubuntu:14.04
MAINTAINER Cash Williams
# Update and install packages
RUN apt-get update
RUN apt-get install -y curl git vim
RUN apt-get install -y -q php5-cli php5-curl
# Create "behat" user with password crypted "behat"
RUN useradd -d /home/behat -m -s /bin/bash behat
RUN echo "behat:behat" | chpasswd
# Behat alias in docker container
ADD behat /home/behat/behat
RUN chmod +x /home/behat/behat
# Create a new zsh configuration from the provided template
ADD .bashrc /home/behat/.bashrc
# Fix permissions
RUN chown -R behat:behat /home/behat
# Add "behat" to "sudoers"
RUN echo "behat ALL=(ALL:ALL) ALL" >> /etc/sudoers
USER behat
WORKDIR /home/behat
ENV HOME /home/behat
ENV PATH $PATH:/home/behat
# Install Behat
RUN mkdir /home/behat/composer
ADD composer.json /home/behat/composer/composer.json
RUN cd /home/behat/composer && curl http://getcomposer.org/installer | php
RUN cd /home/behat/composer && php composer.phar install --prefer-source