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

Use a local docker image #6

Open
nilsi opened this issue Aug 17, 2019 · 1 comment
Open

Use a local docker image #6

nilsi opened this issue Aug 17, 2019 · 1 comment

Comments

@nilsi
Copy link

nilsi commented Aug 17, 2019

I got my project defined in a Dockerfile in the same folder where I define tasker in my docker-compose file. Can I somehow run my local docker image without having to push it to docker hub?

This is what Im trying to do in my docker-compose file:

version: "2"

services:
    tasker:
        image: strm/tasker
        volumes:
            - "/var/run/docker.sock:/var/run/docker.sock"
        environment:
             configuration: |
                 schedule:
                     - every: minute 
                       task: book_pilates
                     - cron: 1 7 * * 6
                       task: book_pilates
                 tasks:
                     docker:
                         - name: book_pilates
                           build:
                              dockerfile: ./Dockerfile
                           script:
                               - python test.py 
                               - python test2.py 

And my Dockerfile in the same folder:

FROM python:3
ADD test.py /
ADD test2.py /
RUN pip install selenium

Sorry if this makes no sense, pretty new to docker.

@siben168
Copy link

siben168 commented Dec 1, 2019

I want to ask same questions. i got following errors when i try to run the local image "docker-cron"

2019-12-01 12:34:01.483 ERROR 6 --- [pool-2-thread-1] sh.strm.tasker.runner.DockerTaskRunner : Error running hello task, error:Request error: POST unix://localhost:80/images/create?fromImage=localhost%2Fdocker-cron: 500, body: {"message":"Get http://localhost/v2/: dial tcp [::1]:80: connect: connection refused"}
tasker_1 |
tasker_1 |
tasker_1 | com.spotify.docker.client.exceptions.DockerRequestException: Request error: POST unix://localhost:80/images/create?fromImage=localhost%2Fdocker-cron: 500, body: {"message":"Get http://localhost/v2/: dial tcp [::1]:80: connect: connection refused"}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants