-
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.
- Loading branch information
1 parent
a0e0c49
commit 97678ac
Showing
2 changed files
with
59 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,23 @@ | ||
# Dockerfile | ||
FROM mcr.microsoft.com/devcontainers/typescript-node:0-18 | ||
|
||
# Install wget if not already installed | ||
RUN apt-get update && apt-get install -y wget | ||
|
||
# Install Gatsby CLI and Yarn | ||
RUN npm install -g gatsby-cli yarn | ||
# Let's get the latest version of Yarn | ||
RUN corepack enable | ||
RUN yarn set version berry | ||
|
||
# Download .zshrc from remote address | ||
# RUN sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)" | ||
USER node | ||
RUN wget https://raw.githubusercontent.com/Riverscapes/environment/master/nar-ys.zsh-theme -O ~/.oh-my-zsh/custom/themes/nar-ys.zsh-theme | ||
RUN wget https://raw.githubusercontent.com/Riverscapes/environment/master/.aliases -O ~/.aliases | ||
RUN wget https://raw.githubusercontent.com/Riverscapes/environment/master/.zshrc -O ~/.zshrc | ||
|
||
# set memory to 8Gb so that Gatsby has a chance | ||
ENV NODE_OPTIONS=--max-old-space-size=8192 | ||
ENV GATSBY_CPU_COUNT=2 | ||
|
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,36 @@ | ||
{ | ||
"dockerFile": "Dockerfile", | ||
"name": "Gatsby Docs Dev Container", | ||
"waitFor": "onCreateCommand", | ||
// On container creation, install dependencies. | ||
"postCreateCommand": "yarn install", | ||
// Build and run the dev site on container start. | ||
"postAttachCommand": "cd docs; yarn build; yarn serve", | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"GitHub.copilot", | ||
"GitHub.copilot-chat", | ||
"eriklynd.json-tools", | ||
"yzhang.markdown-all-in-one", | ||
"unifiedjs.vscode-mdx", | ||
"dbaeumer.vscode-eslint", | ||
"christian-kohler.npm-intellisense", | ||
"mhutchie.git-graph", | ||
"GraphQL.vscode-graphql", | ||
"GraphQL.vscode-graphql-syntax" | ||
] | ||
} | ||
}, | ||
// Trigger actions on ports. More info: https://containers.dev/implementors/json_reference/#port-attributes | ||
"portsAttributes": { | ||
"8000": { | ||
"label": "Application", | ||
"onAutoForward": "openPreview" | ||
} | ||
}, | ||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
"forwardPorts": [ | ||
8000 | ||
] | ||
} |