A correct Dockerfile usage

This commit is contained in:
Bruno Pinto 2015-12-05 13:59:13 +00:00
parent 391ea898d4
commit 320578df51
3 changed files with 18 additions and 14 deletions

View File

@ -10,16 +10,17 @@ env:
before_install:
- source tools/travis-github-pr-integration.sh
- docker build -t fish . < Dockerfile
before_script:
- docker run -e 'CI=WORKAROUND' -e "OMF_REPO_URI=$OMF_REPO_URI" -e "OMF_REPO_BRANCH=$OMF_REPO_BRANCH" -t -v $PWD:/src/oh-my-fish fish /usr/bin/fish -c "/src/oh-my-fish/bin/install"
- docker ps -a -q | xargs -i docker commit {} oh-my-fish
- docker run -t -w "/root/.local/share/omf" oh-my-fish /usr/bin/fish -c "export; tree -h"
- docker build --build-arg OMF_REPO_BRANCH=$OMF_REPO_BRANCH --build-arg OMF_REPO_URI=$OMF_REPO_URI -t oh-my-fish . < Dockerfile
- docker run -t oh-my-fish /usr/bin/fish -c "export; tree -h"
script:
- docker run -t -w "/root/.local/share/omf" oh-my-fish /usr/bin/fish "tests/test_runner.fish"
- docker run -t -w "/root/.local/share/omf" oh-my-fish /usr/bin/fish "tests/test-generate-themes-doc.fish"
- docker run -t oh-my-fish /usr/bin/fish "tests/run.fish"
- docker run -t oh-my-fish /usr/bin/fish "tests/test-generate-themes-doc.fish"
after_failure:
- docker ps -a
notifications:
email:

View File

@ -1,11 +1,14 @@
FROM ubuntu
FROM ohmyfish/fish:2.2.0
RUN echo "Installing fish"
RUN sudo apt-get install -y software-properties-common && \
sudo apt-add-repository ppa:fish-shell/release-2 && \
sudo apt-get -y update && \
sudo apt-get -y install fish
COPY . /src/oh-my-fish
RUN echo "Installing dependencies"
RUN sudo apt-get -y install curl git tree
# Prevent install from opening a new fish shell
ENV CI WORKAROUND
# Replace this when offline installation is supported
ARG OMF_REPO_BRANCH=master
ARG OMF_REPO_URI=https://github.com/oh-my-fish/oh-my-fish
RUN fish /src/oh-my-fish/bin/install
WORKDIR /root/.local/share/omf

0
tests/test_runner.fish → tests/run.fish Executable file → Normal file
View File