Skip to content

Use a local docker image #6

@nilsi

Description

@nilsi

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions