yonaskolb / Mint

A package manager that installs and runs executable Swift packages
MIT License
2.27k stars 122 forks source link

Add Docker Support #141

Closed cszatmary closed 2 years ago

cszatmary commented 5 years ago

Background: Mint is a great tool and it is helpful to use it in CI to install tools like SwiftLint. It would be nice if Mint had docker support to avoid having to manually set up Mint in CI. This has also been requested in #128.

Implementation: Added a basic Dockerfile. This will create a docker image with Mint installed at /usr/local/bin. An image can be created by running docker build -t <name> . when in the root directory of this project.

Question: Would you be able to publish the image to Docker Hub so it can easily be used by other people?

LinusU commented 5 years ago

It would be really nice if we could add WORKDIR /work and CMD mint run lines so that the docker file can be used e.g. to run SwiftLint like so:

docker run --rm -v `pwd`:/work yonaskolb/Mint realm/SwiftLint

I think it's a neat trick for just running SwiftLint without having to install anything (provided that you already have Docker ☺️)

rex-remind101 commented 4 years ago

Will this be getting in?