An unofficial dockerfile for BigCommerce's Stencil CLI.
# build docker image
docker build -t stencil https://raw.githubusercontent.com/aglensmith/docker-stencil-cli/master/dockerfile.v2
OSX and Linux:
# stencil init
docker run -it -v $(pwd):/theme -p3000:3000 stencil init
# stencil start
docker run -it -v $(pwd):/theme -p3000:3000 stencil start
Windows (bash):
# stencil init
docker run -it -v /$(PWD):/theme -p3000:3000 stencil init
# stencil start
docker run -it -v /$(PWD):/theme -p3000:3000 stencil start
Open ~/.bashrc
in your preferred editor and add an alias
for the docker command.
OSX and Linux:
alias stencil="docker run -it -v $(pwd):/theme -p3000:3000 stencil"
Windows:
alias stencil="docker run -it -v /$(PWD):/theme -p3000:3000 stencil"
Reload your ~/.bashrc
.
source ~/.bashrc
Now you can use the stencil
alias to run the docker command.
stencil start