Skip to content
This repository has been archived by the owner on Aug 12, 2024. It is now read-only.

williamjacksn/docker-netlify-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Important

This repository is archived because I no longer actively use this software. If you have a question about this repo, or you are interested in maintaining it yourself, please open an issue on my personal repository.

docker-netlify-cli

A Docker image for netlify/cli.

docker image pull ghcr.io/williamjacksn/netlify-cli

This image is also available on Docker Hub as williamjackson/netlify-cli.

Usage

In your Netlify user settings, create a personal access token. Set the environment variable NETLIFY_AUTH_TOKEN inside the container.

The default working directory in the container is /project, so mount your project directory into the container at that location.

Specify the Netlify CLI command after the image name.

docker container run -it \
    -e NETLIFY_AUTH_TOKEN=<personal_access_token> \
    -v /path/to/project:/project \
    ghcr.io/williamjacksn/netlify-cli \
    deploy

Compose

# compose.yaml

services:
  netlify-cli:
    image: ghcr.io/williamjacksn/netlify-cli
    environment:
      NETLIFY_AUTH_TOKEN: <personal_access_token>
    volumes:
      - /path/to/project:/project
docker compose run netlify-cli deploy

A note on versions

The netlify/cli project publishes new versions multiple times a day, but this image is only updated roughly once a day. If you want to pin a version, and I suggest you do, check the releases section of this repository to see what versions are available.