You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ke...@apache.org on 2021/04/18 15:17:46 UTC

[skywalking] branch doc/docker created (now 76be80b)

This is an automated email from the ASF dual-hosted git repository.

kezhenxu94 pushed a change to branch doc/docker
in repository https://gitbox.apache.org/repos/asf/skywalking.git.


      at 76be80b  Add Docker image doc

This branch includes the following new commits:

     new 76be80b  Add Docker image doc

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[skywalking] 01/01: Add Docker image doc

Posted by ke...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kezhenxu94 pushed a commit to branch doc/docker
in repository https://gitbox.apache.org/repos/asf/skywalking.git

commit 76be80b3e56fe8e79f93afac00478c2193823834
Author: kezhenxu94 <ke...@apache.org>
AuthorDate: Sun Apr 18 21:34:48 2021 +0800

    Add Docker image doc
---
 .../service-agent/java-agent/containerization.md   | 50 ++++++++++++++++++++++
 docs/menu.yml                                      |  4 ++
 2 files changed, 54 insertions(+)

diff --git a/docs/en/setup/service-agent/java-agent/containerization.md b/docs/en/setup/service-agent/java-agent/containerization.md
new file mode 100644
index 0000000..28b1394
--- /dev/null
+++ b/docs/en/setup/service-agent/java-agent/containerization.md
@@ -0,0 +1,50 @@
+# Docker
+
+This section introduces how to build your Java application image on top of this image.
+
+```dockerfile
+FROM apache/skywalking-java-agent:8.5.0-jdk8
+
+# ... build your java application
+```
+
+You can start your Java application with `CMD` or `ENTRYPOINT`, but you don't need to care about the Java options to
+enable SkyWalking agent, it should be adopted automatically.
+
+# Kubernetes
+
+This section introduces how to use this image as sidecar of Kubernetes service.
+
+In Kubernetes scenarios, you can also use this agent image as a sidecar.
+
+```yaml
+apiVersion: v1
+kind: Pod
+metadata:
+  name: agent-as-sidecar
+spec:
+  restartPolicy: Never
+
+  volumes:
+    - name: skywalking-agent
+      emptyDir: { }
+
+  containers:
+    - name: agent-container
+      image: apache/skywalking-java-agent:8.4.0-alpine
+      volumeMounts:
+        - name: skywalking-agent
+          mountPath: /agent
+      command: [ "/bin/sh" ]
+      args: [ "-c", "cp -R /skywalking/agent /agent/" ]
+
+    - name: app-container
+      image: springio/gs-spring-boot-docker
+      volumeMounts:
+        - name: skywalking-agent
+          mountPath: /skywalking
+      env:
+        - name: JAVA_TOOL_OPTIONS
+          value: "-javaagent:/skywalking/agent/skywalking-agent.jar"
+```
+
diff --git a/docs/menu.yml b/docs/menu.yml
index 56616fe..8599776 100644
--- a/docs/menu.yml
+++ b/docs/menu.yml
@@ -61,6 +61,10 @@ catalog:
         catalog:
         - name: "Setup"
           path: "/en/setup/service-agent/java-agent/readme"
+        - name: "Setup in Docker"
+          path: "/en/setup/service-agent/java-agent/containerization#docker"
+        - name: "Setup in Kubernetes"
+          path: "/en/setup/service-agent/java-agent/containerization#kubernetes"
         - name: "Supported middleware, framework and library"
           path: "/en/setup/service-agent/java-agent/Supported-list"
         - name: "Agent Configuration Properties"