forked from pouchdb/pouchdb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setting up Ruby v2.7 is getting increasingly difficult on newer systems. This PR aims to help with that by providing a simple way to launch a documentation dev environment.
- Loading branch information
alxndrsn
committed
Jan 8, 2025
1 parent
bbff7f9
commit 7248b35
Showing
4 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
** | ||
|
||
!/package.json | ||
!/bin/build-site.js | ||
!/bin/install-jekyll.sh | ||
!/package-lock.json | ||
!/docs/Gemfile | ||
!/docs/Gemfile.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# maintain similarity to CI by using common base image: | ||
FROM ubuntu:20.04 | ||
|
||
RUN apt-get update && \ | ||
apt-get --yes install \ | ||
build-essential \ | ||
curl \ | ||
ruby-full \ | ||
&& \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# TODO confirm ruby version is 2.7... if it matters | ||
RUN gem install bundler -v 2.1.4 | ||
|
||
ENV NODE_VERSION=22.12.0 | ||
ENV NVM_DIR=/root/.nvm | ||
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash | ||
RUN . "$NVM_DIR/nvm.sh" && nvm install 22 | ||
ENV PATH="$NVM_DIR/versions/node/v${NODE_VERSION}/bin/:${PATH}" | ||
|
||
WORKDIR /pouchdb-docs | ||
|
||
COPY package.json package-lock.json . | ||
COPY ./bin/ ./bin/ | ||
|
||
COPY ./docs/Gemfile* ./docs/ | ||
RUN npm run install-jekyll | ||
RUN rm -rf ./docs | ||
|
||
RUN npm install --ci | ||
|
||
CMD ["npm", "run", "build-site"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters