Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: STRF-9807 Dockerize stencil cli #938

Merged
merged 1 commit into from
May 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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