-
Notifications
You must be signed in to change notification settings - Fork 277
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update Dockerfile for latest website changes * Update to Node 16. * Do not run as root, this also works better with Node privilege-dropping. * Update README with new run instructions. * Add .dockerignore to avoid sending large build contexts
- Loading branch information
Showing
3 changed files
with
21 additions
and
12 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,11 @@ | ||
# Avoid uploading large Docker contexts | ||
.cache/ | ||
public/ | ||
node_modules | ||
.npm | ||
logs | ||
*.log | ||
npm-debug.log* | ||
www/ | ||
_deploy.sh | ||
*.html |
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 |
---|---|---|
@@ -1,16 +1,14 @@ | ||
FROM node:11.15.0 | ||
FROM node:16 | ||
|
||
WORKDIR /thinc-ai | ||
|
||
RUN npm install -g gatsby-cli@2.7.4 | ||
|
||
COPY package.json . | ||
COPY package-lock.json . | ||
|
||
RUN npm install | ||
USER node | ||
|
||
# This is so the installed node_modules will be up one directory | ||
# from where a user mounts files, so that they don't accidentally mount | ||
# their own node_modules from a different build | ||
# https://nodejs.org/api/modules.html#modules_loading_from_node_modules_folders | ||
WORKDIR /thinc-ai/website/ | ||
WORKDIR /home/node | ||
COPY --chown=node package.json . | ||
COPY --chown=node package-lock.json . | ||
RUN npm install | ||
|
||
WORKDIR /home/node/website/ |
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