Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUESTION] Is there way to use a custom docker image? #4741

Closed
moylop260 opened this issue Sep 2, 2015 · 5 comments
Labels

Comments

@moylop260
Copy link

@moylop260 moylop260 commented Sep 2, 2015

We have docker images with all packages pre-installed and pre-configured.
We need run script and install section of .travis.yml to run test.
Is posible configurate a docker custom image in .travis.yml to use it?

This save a lot time and help me to test my docker image plus my repository source code.

@BanzaiMan

This comment has been minimized.

Copy link
Member

@BanzaiMan BanzaiMan commented Sep 4, 2015

Have you tried docker pull in before_install?

@BanzaiMan BanzaiMan added the docker label Sep 4, 2015
@moylop260 moylop260 closed this Sep 7, 2015
@moylop260 moylop260 reopened this Sep 21, 2015
@BanzaiMan

This comment has been minimized.

Copy link
Member

@BanzaiMan BanzaiMan commented Sep 21, 2015

Is there anything to address on this issue?

@moylop260

This comment has been minimized.

Copy link
Author

@moylop260 moylop260 commented Sep 21, 2015

@BanzaiMan
Thanks for reply
I'm talking about of use for example a custom image:

docker pull quay.io/travisci/travis-python
docker run --name quay.io/moylop260/travis-python-custom quay.io/travisci/travis-python bash
pip install -r requirements.txt
apt-get install packages
wget extras-download

git push quay.io/moylop260/travis-python-custom

docker commit quay.io/moylop260/travis-python-custom
docker push quay.io/moylop260/travis-python-custom

And now use it in my builds with
.travis.yml

language: moylop260/python-custom
@BanzaiMan

This comment has been minimized.

Copy link
Member

@BanzaiMan BanzaiMan commented Sep 21, 2015

@moylop260

Am I correct to understand that, in the end, you want to use the Python image with your requirements pre-installed? Then creating a custom Docker image on top of our build image is not what you want. It is too big for your purposes. (I am also not sure what git push… is supposed to do; I assume you meant docker push ….)

If you have a public repository using the containers (http://docs.travis-ci.com/user/workers/container-based-infrastructure/) you can simply set up cache (http://docs.travis-ci.com/user/caching).

If you want to use custom Python image, you might want to start with https://hub.docker.com/_/python/.

In all cases, the language value in your .travis.yml should be one that's recognized; in your case python.

@moylop260

This comment has been minimized.

Copy link
Author

@moylop260 moylop260 commented Sep 22, 2015

Hello @BanzaiMan,
Thanks for reply.

typo with git push I'm talking about docker push.

But I'm understand your point of set up cache I saw the doc.
I will to use it.

However, should be a cool feature that we can choose image where you can run the default travis-ci script from .travis.yml structure similar to shippable
We make a custom image and set up use this one and later install, script and other .travis.yml section are executed into this image.
This is useful when you have a image with all installed and require sudo.

But thank you for information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.