You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "kezhenxu94 (via GitHub)" <gi...@apache.org> on 2023/03/20 07:17:07 UTC

[GitHub] [skywalking-python] kezhenxu94 commented on a diff in pull request #297: [feat]Build multi-architecture Docker images for Python agent

kezhenxu94 commented on code in PR #297:
URL: https://github.com/apache/skywalking-python/pull/297#discussion_r1141700680


##########
.github/workflows/publish-docker.yaml:
##########
@@ -0,0 +1,53 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+name: publish-docker
+
+on:
+  push:
+    branches:
+      - master
+
+env:
+  HUB: ghcr.io/apache/skywalking-python
+  PROJECT: skywalking-python
+
+jobs:
+  build-docker:
+    if: github.repository == 'apache/skywalking-python'
+    runs-on: ubuntu-latest
+    permissions:
+      contents: read
+      packages: write
+    timeout-minutes: 30
+    env:
+      VERSION: 1.0.0

Review Comment:
   As this workflow push the snapshot docker images, we should use the github commit sha (`${{ github.sha }}`) as the image tag, and ensure the images pushed are with latest codes in main branch.



##########
docker/Dockerfile:
##########
@@ -21,7 +21,9 @@ FROM ${BASE_PYTHON_IMAGE}
 ARG SW_PYTHON_AGENT_PROTOCOL
 ARG SW_PYTHON_AGENT_VERSION
 
-RUN pip install --no-cache-dir "apache-skywalking[${SW_PYTHON_AGENT_PROTOCOL}]==${SW_PYTHON_AGENT_VERSION}"
+COPY dist/apache_skywalking*.whl /tmp/

Review Comment:
   Is the `.whl` file is architecture independent? If it's architecture dependent we cannot simply copy the `.whl` file into the Docker image, instead we should build the `.whl` file inside Dockerfile. @Superskyyy any input?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org