forked from teracyhq/docker-files
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
@ teracyhq#42 | create teracy/travis image
- Loading branch information
1 parent
7f11976
commit 3d21b4b
Showing
4 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"vm": { | ||
"synced_folders":[{ // Enable this for .git two-way sync | ||
"_id": "docker-files-0", | ||
"type": "virtual_box", | ||
"host": "./workspace/docker-files/.git", | ||
"guest": "/home/vagrant/workspace/docker-files/.git", | ||
"mount_options": [ | ||
"dmode=775", | ||
"fmode=755" | ||
] | ||
}] | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
ARG RUBY_VERSION=2.3.4 | ||
FROM ruby:${RUBY_VERSION} | ||
|
||
LABEL authors="hieptranquoc" | ||
|
||
# add more arguments from CI to the image so that `$ env` should reveal more info | ||
ARG CI_BUILD_ID | ||
ARG CI_BUILD_REF | ||
ARG CI_REGISTRY_IMAGE | ||
ARG CI_BUILD_TIME | ||
|
||
ENV CI_BUILD_ID=$CI_BUILD_ID CI_BUILD_REF=$CI_BUILD_REF CI_REGISTRY_IMAGE=$CI_REGISTRY_IMAGE \ | ||
CI_BUILD_TIME=$CI_BUILD_TIME | ||
|
||
ARG BRANCH_NAME="master" | ||
|
||
RUN mkdir -p $HOME/builds | ||
|
||
RUN cd $HOME/builds; \ | ||
git clone --depth=50 --branch=${BRANCH_NAME} https://github.com/travis-ci/travis-build.git; \ | ||
cd travis-build; \ | ||
gem install travis; \ | ||
printf "y" | travis; \ | ||
ln -s `pwd` ~/.travis/travis-build; \ | ||
bundle install --gemfile ~/.travis/travis-build/Gemfile; \ | ||
bundler binstubs travis | ||
|
||
ENTRYPOINT ["travis"] | ||
CMD [ "sh" ] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# teracy/travis-build Docker image | ||
|
||
teracy/travis-build image for travis-ci runners locally. | ||
|
||
## How to use | ||
|
||
- To get docker volume mapping work, you should use the below usage example for each specific directory: | ||
|
||
``` | ||
$ ws | ||
$ cd <project_you_want_to_run> | ||
$ docker run --rm -v $(pwd):/tmp -w /tmp teracy/travis-build compile > build.sh | ||
``` | ||
|
||
You will see `build.sh` file in project! |