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

Dockerize npm #12

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM node:10.19.0 as build
ARG BUILD_CONTEXT

# Run to build the theme
# docker build -t islandora_starter_theme .
# docker run --rm -v $(pwd):/usr/src/project islandora_starter_theme bash -c "bash autobuild.sh"

RUN npm install -g gulp@4.0.2 gulp-cli

RUN mkdir -p /usr/src/project
WORKDIR /usr/src/project
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ config/install/color.theme.islandora_starter_theme.yml
## CSS
Comes with precomiled SCSS files.

### To compile:
### To compile locally:
You will need nodejs, npm, gulp, gulp-cli, sass installed.
```
$ cd codebase/web/themes/contrib/islandora_starter_theme
Expand All @@ -27,3 +27,10 @@ v10.19.0
CLI version: 2.3.0
Local version: 4.0.2
```

### To compile with Docker:
You will start a Docker container that includes nodejs, npm, gulp, gulp-cli, sass already installed.
```shell
docker build -t idc_theme_build .
docker run --rm -v $(pwd):/usr/src/project islandora_starter_theme bash -c "bash autobuild.sh"
```
4 changes: 4 additions & 0 deletions autobuild.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash

npm install
gulp styles