Skip to content

Commit

Permalink
Merge pull request #39 from cap-js/devcontainer
Browse files Browse the repository at this point in the history
add devcontainer
  • Loading branch information
DanSchlachter authored Jan 22, 2024
2 parents dc8d9a8 + 1836da0 commit f0a8a7a
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.187.0/containers/javascript-node/.devcontainer/base.Dockerfile

# [Choice] Node.js version: 18, 16, 14
ARG VARIANT="18-buster"
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}

# Install extra tools for CAP development & deployment.
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends curl git jq

# Install SAP CAP SDK globally
RUN su node -c "npm install -g @sap/cds-dk"
22 changes: 22 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "CAP Incident Management Reference App Dev Container",
"build": {
"dockerfile": "Dockerfile",
"args": { "VARIANT": "18" }
},
"customizations": {
"vscode": {
"extensions": [
"mechatroner.rainbow-csv",
"dbaeumer.vscode-eslint",
"sapse.vscode-cds",
"sapse.vsc-extension-odata-csdl-modeler",
"sapse.vscode-wing-cds-editor-vsc",
"saposs.xml-toolkit",
"humao.rest-client"
]
}
},
"forwardPorts": [ 4004 ],
"remoteUser": "node"
}

0 comments on commit f0a8a7a

Please sign in to comment.