From ce3d70e1330909f956a5a43c29b930b96b1f22a2 Mon Sep 17 00:00:00 2001 From: Angel Nunez Mencias Date: Sun, 3 Nov 2024 23:18:22 -0300 Subject: [PATCH] add dev container --- .devcontainer/devcontainer.json | 19 +++++++++++++++++++ Dockerfile | 13 ++++++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..f9c2405 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,19 @@ +{ + "build": { + "dockerfile": "../Dockerfile", + "target": "dev" + }, + + "customizations": { + "vscode": { + "extensions": [ + "dbaeumer.vscode-eslint", + "ms-azuretools.vscode-docker" + ] + } + }, + + "postStartCommand": "nginx", + + "appPort": "8080:80" + } \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 67fd379..7fc5378 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1 +1,12 @@ -FROM alpine +FROM alpine AS common +# Insert here instructions to build your container, both for dev and production + +# Example - install a web server +RUN apk add nginx + +FROM common as dev +# Insert here all the dev only tools you need such as debuggers +RUN apk add git + +FROM common as prod +# Insert here production only things such as keys or production settings