Module: kamailio
Branch: master
Commit: bad420e9f72c237bbd608a9ff06ae3b63bce9625
URL: 
https://github.com/kamailio/kamailio/commit/bad420e9f72c237bbd608a9ff06ae3b63bce9625

Author: Victor Seva <linuxman...@torreviejawireless.org>
Committer: Victor Seva <linuxman...@torreviejawireless.org>
Date: 2023-07-26T15:10:03+02:00

.devcontainer: Initial support for devcontainers [skip ci]

Allows to develop inside a container using vscode

> https://code.visualstudio.com/docs/devcontainers/containers

---

Added: .devcontainer/Dockerfile
Added: .devcontainer/devcontainer.json

---

Diff:  
https://github.com/kamailio/kamailio/commit/bad420e9f72c237bbd608a9ff06ae3b63bce9625.diff
Patch: 
https://github.com/kamailio/kamailio/commit/bad420e9f72c237bbd608a9ff06ae3b63bce9625.patch

---

diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
new file mode 100644
index 00000000000..50a901b764a
--- /dev/null
+++ b/.devcontainer/Dockerfile
@@ -0,0 +1,17 @@
+FROM mcr.microsoft.com/devcontainers/base:bookworm
+# utils packages
+RUN apt-get update && \
+  export DEBIAN_FRONTEND=noninteractive && \
+  apt-get -y install --no-install-recommends \
+    apt-utils dialog clang-format clang pbuilder
+
+# bookworm packaging
+RUN mkdir -p /usr/local/src/pkg
+COPY bookworm /usr/local/src/pkg/debian
+
+# get build dependences
+RUN cd /usr/local/src/pkg/ && \
+  /usr/lib/pbuilder/pbuilder-satisfydepends-experimental
+
+# clean
+RUN apt-get clean && rm -rf /var/lib/apt/lists/*
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
new file mode 100644
index 00000000000..98d103801ea
--- /dev/null
+++ b/.devcontainer/devcontainer.json
@@ -0,0 +1,34 @@
+{
+  /* For format details, see https://aka.ms/devcontainer.json. For config 
options, see the
+   * README at: https://github.com/devcontainers/templates/tree/main/src/debian
+   */
+  "name": "Debian",
+  "build": {
+    "context": "../pkg/kamailio/deb",
+    "dockerfile": "Dockerfile"
+  },
+
+  // Features to add to the dev container. More info: 
https://containers.dev/features.
+  "features": {
+    "ghcr.io/wxw-matt/devcontainer-features/command_runner:0": {}
+  },
+
+  // Use 'forwardPorts' to make a list of ports inside the container available 
locally.
+  "forwardPorts": [
+    5060
+  ],
+
+  // Configure tool-specific properties.
+  "customizations": {
+    "vscode": {
+      "settings": {},
+      "extensions": [
+        "ms-vscode.cpptools-extension-pack",
+        "xaver.clang-format"
+      ]
+    }
+  },
+
+  // Uncomment to connect as root instead. More info: 
https://aka.ms/dev-containers-non-root.
+  "remoteUser": "root"
+}

_______________________________________________
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org

Reply via email to