Last active
June 13, 2018 21:44
-
-
Save douglasmartins7/342e41a990e2609857224c078faff8dd to your computer and use it in GitHub Desktop.
dockerfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From node:latest #latest last version | |
MAINTAINER Douglas Santos #autor | |
COPY . /var/www # o . seria copia da minha pasta local e envia para a do container | |
RUN #executa algo | |
EXPOSE 8080 #porta que ele ira usar | |
ENTRYPOINT cucumber -p chrome -t @basic -p prod #comando para estartar o código | |
WORKDIR #Onde vai começar a execução, a pasta que iniciara | |
ENV #setar a variavel de ambiente, inserir o ambiente que o codigo rodara | |
#example | |
FROM ruby:2.4 | |
ENV DEBIAN_FRONTEND noninteractive | |
ENV DEBCONF_NONINTERACTIVE_SEEN true | |
# Set timezone | |
RUN echo "America/Sao_Paulo" > /etc/timezone && dpkg-reconfigure --frontend noninteractive tzdata | |
RUN apt-get update -y && \ | |
apt-get install -y unzip xvfb \ | |
qt5-default libqt5webkit5-dev \ | |
gstreamer1.0-plugins-base \ | |
gstreamer1.0-tools gstreamer1.0-x \ | |
freetds-dev \ | |
libnss3 libxi6 libgconf-2-4 | |
# install chrome | |
RUN apt-get update -y && \ | |
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \ | |
dpkg -i google-chrome-stable_current_amd64.deb; apt-get -fy install | |
# install chromedriver and place it ib path | |
RUN wget https://chromedriver.storage.googleapis.com/2.40/chromedriver_linux64.zip && \ | |
unzip chromedriver_linux64.zip && \ | |
mv chromedriver /usr/bin/ | |
RUN wget https://github.com/mozilla/geckodriver/releases/download/v0.20.0/geckodriver-v0.20.0-linux64.tar.gz && \ | |
tar xzf geckodriver-v0.20.0-linux64.tar.gz && \ | |
mv geckodriver /usr/bin/ | |
WORKDIR /usr/src/app/ | |
# install required gem files for Capybara | |
COPY ./Gemfile /usr/src/app/ | |
RUN gem install bundler | |
RUN bundle install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment