The netlify-cli package available as a Docker Image
You can use the image in multiple ways:
FROM tryvium/netlify-cli
# ADD or COPY other files and run commands like build and deploy
# Remove or change the inherited entrypoint if you need it.
ENTRYPOINT [""]
$ docker run -e NETLIFY_AUTH_TOKEN="YOUR NETLIFY TOKEN" tryvium/netlify-cli # command and parameters ...
$ # for example
$ # docker run -e NETLIFY_AUTH_TOKEN="YOUR NETLIFY TOKEN" tryvium/netlify-cli deploy
The image is not tested with build and deploy commands, so we encourage you to open issues and PRs if you encounter any problem
Here an example using Gitlab CI
Deploy to netlify:
image:
name: tryvium/netlify-cli
entrypoint: [""]
environment:
NETLIFY_AUTH_TOKEN: "YOUR NETLIFY TOKEN"
script:
- netlify -h