Skip to content

Commit

Permalink
feat: STRF-9807 Dockerize stencil cli
Browse files Browse the repository at this point in the history
  • Loading branch information
jairo-bc committed May 25, 2022
1 parent 53216f1 commit ee1f69f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM node:14

WORKDIR /usr/src/app

RUN npm install -g --unsafe-perm @bigcommerce/stencil-cli

14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,20 @@ If you need any help or experience any bugs, please create a GitHub issue in thi
If you would like to improve this project check out the [Contributing Guide](./CONTRIBUTING.md). Also, you can find
the implementation details there.

## Running in docker

There is possibility to run stencil-cli in docker.
Here are steps to have this functionality.
First of all, build a docker image, let's name it `bc/stencil-cli`
Run `docker build . -t bc/stencil-cli` in stencil-cli repo directory.

Then, after the image is built, you want to run some commands against your theme.

For example
`docker run -p 3005:3005 -v /bigcommerce/cornerstone:/usr/src/app -it bc/stencil-cli stencil init`, where `3005` is port number definded in `config.stencil.json` and `/bigcommerce/cornerstone` path to where theme is located.

`docker run -p 3005:3005 -v /bigcommerce/cornerstone:/usr/src/app -it bc/stencil-cli stencil start` and so on

## License

Copyright (c) 2015-present, BigCommerce Inc.
Expand Down

0 comments on commit ee1f69f

Please sign in to comment.