From 4e058b739e0d036743ca520b42f13fad10289331 Mon Sep 17 00:00:00 2001 From: ~tong <1454579997@qq.com> Date: Wed, 28 Feb 2024 19:03:08 +0800 Subject: [PATCH 01/11] updated the go version to 1.22 --- go.mod | 2 +- go.sum | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 481be0919..24eb09aa4 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/edgenesis/shifu -go 1.20 +go 1.22 require ( github.com/apache/plc4x/plc4go v0.0.0-20220929155823-14e7d8450c87 diff --git a/go.sum b/go.sum index a07a7fdb5..5c558d249 100644 --- a/go.sum +++ b/go.sum @@ -3,11 +3,15 @@ github.com/Azure/azure-sdk-for-go/sdk/ai/azopenai v0.4.1/go.mod h1:VXAmay6g9K3DQ github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.2 h1:c4k2FIYIh4xtwqrQwV0Ct1v5+ehlNXj5NI/MWVsiTkQ= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.2/go.mod h1:5FDJtLEO/GxwNgUxbwrY3LP0pEoThTQJtk2oysdXHxM= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0 h1:vcYCAze6p19qBW7MhZybIsqD8sMV8js0NyQM8JDnVtg= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0/go.mod h1:OQeznEEkTZ9OrhHJoDD8ZDq51FHgXjqtP9z6bEwBq9U= github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 h1:LqbJ/WzJUwBf8UiaSzgX7aMclParm9/5Vgp+TY51uBQ= github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2/go.mod h1:yInRyqWXAuaPrgI7p70+lDDgh3mlBohis29jGMISnmc= github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys v1.0.0 h1:yfJe15aSwEQ6Oo6J+gdfdulPNoZ3TEhmbhLIoxZcA+U= +github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys v1.0.0/go.mod h1:Q28U+75mpCaSCDowNEmhIo/rmgdkqmkmzI7N6TGR4UY= github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v0.8.0 h1:T028gtTPiYt/RMUfs8nVsAL7FDQrfLlrm/NnRG/zcC4= +github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v0.8.0/go.mod h1:cw4zVQgBby0Z5f2v0itn6se2dDP17nTjbZFXW5uPyHA= github.com/AzureAD/microsoft-authentication-library-for-go v1.1.0 h1:HCc0+LpPfpCKs6LGGLAhwBARt9632unrVcI6i8s/8os= +github.com/AzureAD/microsoft-authentication-library-for-go v1.1.0/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= github.com/DATA-DOG/go-sqlmock v1.5.2 h1:OcvFkGmslmlZibjAjaHm3L//6LiuBgolP7OputlJIzU= github.com/DATA-DOG/go-sqlmock v1.5.2/go.mod h1:88MAG/4G7SMwSE3CeA0ZKzrT5CiOU3OJ+JlNzwDqpNU= github.com/IBM/netaddr v1.5.0 h1:IJlFZe1+nFs09TeMB/HOP4+xBnX2iM/xgiDOgZgTJq0= @@ -17,6 +21,7 @@ github.com/apache/plc4x/plc4go v0.0.0-20220929155823-14e7d8450c87/go.mod h1:NTdw github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/blendle/zapdriver v1.3.1 h1:C3dydBOWYRiOk+B8X9IVZ5IOe+7cl+tGOexN4QqHfpE= +github.com/blendle/zapdriver v1.3.1/go.mod h1:mdXfREi6u5MArG4j9fewC+FGnXaBR+T4Ox4J2u4eHCc= github.com/briandowns/spinner v1.23.0 h1:alDF2guRWqa/FOZZYWjlMIx2L6H0wyewPxo/CH4Pt2A= github.com/briandowns/spinner v1.23.0/go.mod h1:rPG4gmXeN3wQV/TsAY4w8lPdIM6RX3yqeBQJSrbXjuE= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= @@ -31,6 +36,7 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= +github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/eclipse/paho.mqtt.golang v1.4.3 h1:2kwcUGn8seMUfWndX0hGbvH8r7crgcJguQNCyp70xik= @@ -64,6 +70,7 @@ github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5x github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v5 v5.0.0 h1:1n1XNM9hk7O9mnQoNBGolZvzebBQ7p93ULHRc28XJUE= +github.com/golang-jwt/jwt/v5 v5.0.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 h1:au07oEsX2xN0ktxqI+Sida1w446QrXBRJ0nee3SNZlA= github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang-sql/sqlexp v0.1.0 h1:ZCD6MBpcuOVfGVqsEmY5/4FtYiKz6tSyUv9LPEDei6A= @@ -106,7 +113,9 @@ github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLf github.com/jacobsa/go-serial v0.0.0-20180131005756-15cf729a72d4 h1:G2ztCwXov8mRvP0ZfjE6nAlaCX2XbykaeHdbT6KwDz0= github.com/jacobsa/go-serial v0.0.0-20180131005756-15cf729a72d4/go.mod h1:2RvX5ZjVtsznNZPEt4xwJXNJrM3VTZoQf7V6gk0ysvs= github.com/jinzhu/copier v0.3.5 h1:GlvfUwHk62RokgqVNvYsku0TATCF7bAHVwEXoBh3iJg= +github.com/jinzhu/copier v0.3.5/go.mod h1:DfbEm0FYsaqBcKcFuvmOZb218JkPGtvSHsKg8S8hyyg= github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= +github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= @@ -121,11 +130,13 @@ github.com/klauspost/cpuid/v2 v2.2.6 h1:ndNyv040zDGIDh8thGkXYjnFtiN02M1PVVF+JE/4 github.com/klauspost/cpuid/v2 v2.2.6/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/libp2p/go-reuseport v0.2.0 h1:18PRvIMlpY6ZK85nIAicSBuXXvrYoSw3dsBAR7zc560= github.com/libp2p/go-reuseport v0.2.0/go.mod h1:bvVho6eLMm6Bz5hmU0LYN3ixd3nPPvtIlaURZZgOY4k= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= @@ -161,7 +172,9 @@ github.com/onsi/ginkgo/v2 v2.15.0/go.mod h1:HlxMHtYF57y6Dpf+mc5529KKmSq9h2FpCF+/ github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8= github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/pascaldekloe/goe v0.1.1 h1:Ah6WQ56rZONR3RW3qWa2NCZ6JAVvSpUcoLBaOmYFt9Q= +github.com/pascaldekloe/goe v0.1.1/go.mod h1:KSyfaxQOh0HZPjDP1FL/kFtbqYqrALJTaMafFUIccqU= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= +github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -175,6 +188,7 @@ github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGy github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= @@ -204,6 +218,7 @@ github.com/taosdata/driver-go/v3 v3.5.2/go.mod h1:H2vo/At+rOPY1aMzUV9P49SVX7NlXb github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= @@ -220,6 +235,7 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= +golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= From a6066abd45cc046abd08c0141e5a76da63a39e4d Mon Sep 17 00:00:00 2001 From: ~tong <1454579997@qq.com> Date: Wed, 28 Feb 2024 20:34:45 +0800 Subject: [PATCH 02/11] changed the go version to 1.22 in dockerfile and yaml --- .github/workflows/codecov.yml | 2 +- .github/workflows/golangci-lint.yml | 2 +- .github/workflows/release.yml | 2 +- azure-pipelines/azure-pipelines.yml | 4 ++-- dockerfiles/Dockerfile.deviceshifuHTTP | 2 +- dockerfiles/Dockerfile.deviceshifuMQTT | 2 +- dockerfiles/Dockerfile.deviceshifuOPCUA | 2 +- dockerfiles/Dockerfile.deviceshifuPLC4X | 2 +- dockerfiles/Dockerfile.deviceshifuSocket | 2 +- dockerfiles/Dockerfile.deviceshifuTCP | 2 +- dockerfiles/Dockerfile.telemetryservice | 2 +- docs/development/develop-deviceshifu.md | 2 +- docs/development/develop-on-linux-zh.md | 4 ++-- docs/development/develop-on-linux.md | 4 ++-- docs/development/develop-on-mac-zh.md | 4 ++-- docs/development/develop-on-mac.md | 4 ++-- docs/development/develop-on-windows-zh.md | 4 ++-- docs/development/develop-on-windows.md | 4 ++-- examples/deviceshifu/customized/humidity_detector/Dockerfile | 2 +- .../customized/humidity_detector/mockserver/Dockerfile | 2 +- .../Dockerfile.deviceshifuHTTP-Python | 2 +- examples/deviceshifu/hello-world-device/Dockerfile | 2 +- .../high-temperature-detector-application/Dockerfile | 2 +- examples/deviceshifu/mockdevice/agv/Dockerfile.mockdevice-agv | 2 +- .../plate-reader/Dockerfile.mockdevice-plate-reader | 2 +- examples/deviceshifu/mockdevice/plc/Dockerfile.mockdevice-plc | 2 +- .../mockdevice/robot-arm/Dockerfile.mockdevice-robot-arm | 2 +- .../mockdevice/socket/Dockerfile.mockdevice-socket | 2 +- .../mockdevice/thermometer/Dockerfile.mockdevice-thermometer | 2 +- examples/driver_utils/simple-alpine/Dockerfile.sample | 2 +- examples/telemetryservice/mockclient/Dockerfile.mockclient | 2 +- examples/telemetryservice/mockserver/Dockerfile.mockserver | 2 +- pkg/k8s/crd/Dockerfile | 2 +- 33 files changed, 40 insertions(+), 40 deletions(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index e35f289e0..57238f857 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -15,7 +15,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v2 with: - go-version: "1.20.2" + go-version: "1.22.0" - name: Install pcap run: sudo apt-get install libpcap-dev - name: Run coverage diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 6cd0fbfa6..5c3c9a940 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -16,7 +16,7 @@ jobs: steps: - uses: actions/setup-go@v3 with: - go-version: 1.20.2 + go-version: 1.22.0 - name: Install pcap run: sudo apt-get install libpcap-dev - uses: actions/checkout@v3 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e5942256c..9f8f266ac 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,7 +24,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-go@v4 with: - go-version: "1.20.2" + go-version: "1.22.0" - name: set version run: | echo "VERSION=$(echo "${{inputs.tag_name}}" | cut -d '-' -f1)" >> "$GITHUB_ENV" diff --git a/azure-pipelines/azure-pipelines.yml b/azure-pipelines/azure-pipelines.yml index af30f214c..dfa29f2ba 100644 --- a/azure-pipelines/azure-pipelines.yml +++ b/azure-pipelines/azure-pipelines.yml @@ -46,7 +46,7 @@ stages: steps: - task: GoTool@0 inputs: - version: '1.20.2' + version: '1.22.0' - task: Go@0 displayName: "go get" inputs: @@ -67,7 +67,7 @@ stages: steps: - task: GoTool@0 inputs: - version: '1.20.2' + version: '1.22.0' - task: Go@0 displayName: "go get" inputs: diff --git a/dockerfiles/Dockerfile.deviceshifuHTTP b/dockerfiles/Dockerfile.deviceshifuHTTP index a385302be..303e6ce0f 100644 --- a/dockerfiles/Dockerfile.deviceshifuHTTP +++ b/dockerfiles/Dockerfile.deviceshifuHTTP @@ -1,5 +1,5 @@ # Build the manager binary -FROM --platform=$BUILDPLATFORM golang:1.20.2 as builder +FROM --platform=$BUILDPLATFORM golang:1.22.0 as builder WORKDIR /shifu diff --git a/dockerfiles/Dockerfile.deviceshifuMQTT b/dockerfiles/Dockerfile.deviceshifuMQTT index 25ce9a3de..194b411ec 100644 --- a/dockerfiles/Dockerfile.deviceshifuMQTT +++ b/dockerfiles/Dockerfile.deviceshifuMQTT @@ -1,5 +1,5 @@ # Build the manager binary -FROM --platform=$BUILDPLATFORM golang:1.20.2 as builder +FROM --platform=$BUILDPLATFORM golang:1.22.0 as builder WORKDIR /shifu diff --git a/dockerfiles/Dockerfile.deviceshifuOPCUA b/dockerfiles/Dockerfile.deviceshifuOPCUA index a25f5fa23..c8b487266 100644 --- a/dockerfiles/Dockerfile.deviceshifuOPCUA +++ b/dockerfiles/Dockerfile.deviceshifuOPCUA @@ -1,5 +1,5 @@ # Build the manager binary -FROM --platform=$BUILDPLATFORM golang:1.20.2 as builder +FROM --platform=$BUILDPLATFORM golang:1.22.0 as builder WORKDIR /shifu diff --git a/dockerfiles/Dockerfile.deviceshifuPLC4X b/dockerfiles/Dockerfile.deviceshifuPLC4X index e318cbf12..09acdba53 100644 --- a/dockerfiles/Dockerfile.deviceshifuPLC4X +++ b/dockerfiles/Dockerfile.deviceshifuPLC4X @@ -1,5 +1,5 @@ # Build the manager binary -FROM --platform=$TARGETPLATFORM golang:1.20.2-buster as builder +FROM --platform=$TARGETPLATFORM golang:1.22.0-buster as builder WORKDIR /shifu diff --git a/dockerfiles/Dockerfile.deviceshifuSocket b/dockerfiles/Dockerfile.deviceshifuSocket index e5b68c08b..3a0bfd4cd 100644 --- a/dockerfiles/Dockerfile.deviceshifuSocket +++ b/dockerfiles/Dockerfile.deviceshifuSocket @@ -1,5 +1,5 @@ # Build the manager binary -FROM --platform=$BUILDPLATFORM golang:1.20.2 as builder +FROM --platform=$BUILDPLATFORM golang:1.22.0 as builder WORKDIR /shifu diff --git a/dockerfiles/Dockerfile.deviceshifuTCP b/dockerfiles/Dockerfile.deviceshifuTCP index 4eb579161..c127e35a7 100644 --- a/dockerfiles/Dockerfile.deviceshifuTCP +++ b/dockerfiles/Dockerfile.deviceshifuTCP @@ -1,5 +1,5 @@ # Build the manager binary -FROM --platform=$BUILDPLATFORM golang:1.20.2 as builder +FROM --platform=$BUILDPLATFORM golang:1.22.0 as builder WORKDIR /shifu diff --git a/dockerfiles/Dockerfile.telemetryservice b/dockerfiles/Dockerfile.telemetryservice index 5b87054b0..91e699408 100644 --- a/dockerfiles/Dockerfile.telemetryservice +++ b/dockerfiles/Dockerfile.telemetryservice @@ -1,5 +1,5 @@ # Build the manager binary -FROM --platform=$BUILDPLATFORM golang:1.20.2 as builder +FROM --platform=$BUILDPLATFORM golang:1.22.0 as builder WORKDIR /shifu diff --git a/docs/development/develop-deviceshifu.md b/docs/development/develop-deviceshifu.md index af2b54658..f00e960f9 100644 --- a/docs/development/develop-deviceshifu.md +++ b/docs/development/develop-deviceshifu.md @@ -223,7 +223,7 @@ The dockerfile, take `MQTT` as example, can be: ```dockerfile # Build the manager binary -FROM --platform=$BUILDPLATFORM golang:1.20.4 as builder +FROM --platform=$BUILDPLATFORM golang:1.22.0 as builder WORKDIR /shifu diff --git a/docs/development/develop-on-linux-zh.md b/docs/development/develop-on-linux-zh.md index c88a63d81..7d07d6dc3 100644 --- a/docs/development/develop-on-linux-zh.md +++ b/docs/development/develop-on-linux-zh.md @@ -47,8 +47,8 @@ git clone https://github.com/Edgenesis/shifu.git 从 [Go](https://go.dev/doc/install) 官网, 利用下面的命令下载并安装: ```bash -wget https://go.dev/dl/go1.20.2.linux-amd64.tar.gz -rm -rf /usr/local/go && tar -C /usr/local -xzf go1.20.2.linux-amd64.tar.gz +wget https://go.dev/dl/go1.22.0.linux-amd64.tar.gz +rm -rf /usr/local/go && tar -C /usr/local -xzf go1.22.0.linux-amd64.tar.gz echo "export PATH=$PATH:/usr/local/go/bin" >> $HOME/.profile ``` diff --git a/docs/development/develop-on-linux.md b/docs/development/develop-on-linux.md index ba4b5f123..cb033025b 100644 --- a/docs/development/develop-on-linux.md +++ b/docs/development/develop-on-linux.md @@ -47,8 +47,8 @@ Click on that, VSCode should open your project in remote container. Your develop From [Go](https://go.dev/doc/install), download and install go using the following command: ```bash -wget https://go.dev/dl/go1.20.2.linux-amd64.tar.gz -rm -rf /usr/local/go && tar -C /usr/local -xzf go1.20.2.linux-amd64.tar.gz +wget https://go.dev/dl/go1.22.0.linux-amd64.tar.gz +rm -rf /usr/local/go && tar -C /usr/local -xzf go1.22.0.linux-amd64.tar.gz echo "export PATH=$PATH:/usr/local/go/bin" >> $HOME/.profile ``` diff --git a/docs/development/develop-on-mac-zh.md b/docs/development/develop-on-mac-zh.md index 5450f33e8..d61fdd723 100644 --- a/docs/development/develop-on-mac-zh.md +++ b/docs/development/develop-on-mac-zh.md @@ -57,11 +57,11 @@ git clone https://github.com/Edgenesis/shifu.git 运行 英特尔(amd64) 的 Mac: ``` -https://go.dev/dl/go1.20.2.darwin-amd64.pkg +https://go.dev/dl/go1.22.0.darwin-amd64.pkg ``` 运行 M1(arm64) 的 Mac: ``` -https://go.dev/dl/go1.20.2.darwin-arm64.pkg +https://go.dev/dl/go1.22.0.darwin-arm64.pkg ``` ### 1.6 安装 `kind` diff --git a/docs/development/develop-on-mac.md b/docs/development/develop-on-mac.md index de70319c5..e4741166f 100644 --- a/docs/development/develop-on-mac.md +++ b/docs/development/develop-on-mac.md @@ -56,11 +56,11 @@ Depending on your Mac's CPU architecture, you can download one of the following For Intel(amd64) Macs: ``` -https://go.dev/dl/go1.20.2.darwin-amd64.pkg +https://go.dev/dl/go1.22.0.darwin-amd64.pkg ``` For M1(arm64) Macs: ``` -https://go.dev/dl/go1.20.2.darwin-arm64.pkg +https://go.dev/dl/go1.22.0.darwin-arm64.pkg ``` ### 1.6 Install `kind` diff --git a/docs/development/develop-on-windows-zh.md b/docs/development/develop-on-windows-zh.md index b76374ac6..a62ac3154 100644 --- a/docs/development/develop-on-windows-zh.md +++ b/docs/development/develop-on-windows-zh.md @@ -56,8 +56,8 @@ git clone https://github.com/Edgenesis/shifu.git ### 1.6 安装 `Go` 从 [Go](https://go.dev/doc/install) 官网, 利用下面的命令下载并安装: ```bash -$ wget https://go.dev/dl/go1.20.2.linux-amd64.tar.gz -$ rm -rf /usr/local/go && tar -C /usr/local -xzf go1.20.2.linux-amd64.tar.gz +$ wget https://go.dev/dl/go1.22.0.linux-amd64.tar.gz +$ rm -rf /usr/local/go && tar -C /usr/local -xzf go1.22.0.linux-amd64.tar.gz $ echo "export PATH=$PATH:/usr/local/go/bin" >> $HOME/.profile ``` diff --git a/docs/development/develop-on-windows.md b/docs/development/develop-on-windows.md index a579b870b..abaab3d3e 100644 --- a/docs/development/develop-on-windows.md +++ b/docs/development/develop-on-windows.md @@ -56,8 +56,8 @@ Click on that, VSCode should open your project in remote container. Your develop ### 1.6 Install `Go` From [Go](https://go.dev/doc/install), download and install go using the following command: ```bash -$ wget https://go.dev/dl/go1.20.2.linux-amd64.tar.gz -$ rm -rf /usr/local/go && tar -C /usr/local -xzf go1.20.2.linux-amd64.tar.gz +$ wget https://go.dev/dl/go1.22.0.linux-amd64.tar.gz +$ rm -rf /usr/local/go && tar -C /usr/local -xzf go1.22.0.linux-amd64.tar.gz $ echo "export PATH=$PATH:/usr/local/go/bin" >> $HOME/.profile ``` diff --git a/examples/deviceshifu/customized/humidity_detector/Dockerfile b/examples/deviceshifu/customized/humidity_detector/Dockerfile index 50ce7e328..7c7d538c5 100644 --- a/examples/deviceshifu/customized/humidity_detector/Dockerfile +++ b/examples/deviceshifu/customized/humidity_detector/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.20.2-alpine AS builder +FROM golang:1.22.0-alpine AS builder WORKDIR /humidity-detector COPY humidity-detector.go ./ RUN go mod init humidity-detector diff --git a/examples/deviceshifu/customized/humidity_detector/mockserver/Dockerfile b/examples/deviceshifu/customized/humidity_detector/mockserver/Dockerfile index cbf78d4ef..605024f6c 100644 --- a/examples/deviceshifu/customized/humidity_detector/mockserver/Dockerfile +++ b/examples/deviceshifu/customized/humidity_detector/mockserver/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.20.2-alpine AS builder +FROM golang:1.22.0-alpine AS builder WORKDIR /mockserver COPY *.go ./ RUN go mod init mockserver diff --git a/examples/deviceshifu/customized/humidity_detector/sample_deviceshifu_dockerfiles/Dockerfile.deviceshifuHTTP-Python b/examples/deviceshifu/customized/humidity_detector/sample_deviceshifu_dockerfiles/Dockerfile.deviceshifuHTTP-Python index 08ee78cfd..ad685a9bf 100644 --- a/examples/deviceshifu/customized/humidity_detector/sample_deviceshifu_dockerfiles/Dockerfile.deviceshifuHTTP-Python +++ b/examples/deviceshifu/customized/humidity_detector/sample_deviceshifu_dockerfiles/Dockerfile.deviceshifuHTTP-Python @@ -1,5 +1,5 @@ # Build the manager binary -FROM --platform=$BUILDPLATFORM golang:1.20.2 as builder +FROM --platform=$BUILDPLATFORM golang:1.22.0 as builder WORKDIR /shifu diff --git a/examples/deviceshifu/hello-world-device/Dockerfile b/examples/deviceshifu/hello-world-device/Dockerfile index 2cb7aa3e7..3f1334dd9 100644 --- a/examples/deviceshifu/hello-world-device/Dockerfile +++ b/examples/deviceshifu/hello-world-device/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 -FROM golang:1.20.2-alpine +FROM golang:1.22.0-alpine WORKDIR /app COPY go.mod ./ RUN go mod download diff --git a/examples/deviceshifu/high-temperature-detector-application/Dockerfile b/examples/deviceshifu/high-temperature-detector-application/Dockerfile index 7e0770c8f..a571a84d2 100644 --- a/examples/deviceshifu/high-temperature-detector-application/Dockerfile +++ b/examples/deviceshifu/high-temperature-detector-application/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 -FROM golang:1.20.2-alpine +FROM golang:1.22.0-alpine WORKDIR /app COPY go.mod ./ RUN go mod download diff --git a/examples/deviceshifu/mockdevice/agv/Dockerfile.mockdevice-agv b/examples/deviceshifu/mockdevice/agv/Dockerfile.mockdevice-agv index 8ffacb423..1bf2d19b2 100644 --- a/examples/deviceshifu/mockdevice/agv/Dockerfile.mockdevice-agv +++ b/examples/deviceshifu/mockdevice/agv/Dockerfile.mockdevice-agv @@ -1,5 +1,5 @@ # Build the manager binary -FROM --platform=$BUILDPLATFORM golang:1.20.2 as builder +FROM --platform=$BUILDPLATFORM golang:1.22.0 as builder WORKDIR /shifu diff --git a/examples/deviceshifu/mockdevice/plate-reader/Dockerfile.mockdevice-plate-reader b/examples/deviceshifu/mockdevice/plate-reader/Dockerfile.mockdevice-plate-reader index 0d956a87d..746dc54a2 100644 --- a/examples/deviceshifu/mockdevice/plate-reader/Dockerfile.mockdevice-plate-reader +++ b/examples/deviceshifu/mockdevice/plate-reader/Dockerfile.mockdevice-plate-reader @@ -1,5 +1,5 @@ # Build the manager binary -FROM --platform=$BUILDPLATFORM golang:1.20.2 as builder +FROM --platform=$BUILDPLATFORM golang:1.22.0 as builder WORKDIR /shifu diff --git a/examples/deviceshifu/mockdevice/plc/Dockerfile.mockdevice-plc b/examples/deviceshifu/mockdevice/plc/Dockerfile.mockdevice-plc index d0a9ad3f4..abd1cba74 100644 --- a/examples/deviceshifu/mockdevice/plc/Dockerfile.mockdevice-plc +++ b/examples/deviceshifu/mockdevice/plc/Dockerfile.mockdevice-plc @@ -1,5 +1,5 @@ # Build the manager binary -FROM --platform=$BUILDPLATFORM golang:1.20.2 as builder +FROM --platform=$BUILDPLATFORM golang:1.22.0 as builder WORKDIR /shifu diff --git a/examples/deviceshifu/mockdevice/robot-arm/Dockerfile.mockdevice-robot-arm b/examples/deviceshifu/mockdevice/robot-arm/Dockerfile.mockdevice-robot-arm index 6d9af05b6..1ef0ba466 100644 --- a/examples/deviceshifu/mockdevice/robot-arm/Dockerfile.mockdevice-robot-arm +++ b/examples/deviceshifu/mockdevice/robot-arm/Dockerfile.mockdevice-robot-arm @@ -1,5 +1,5 @@ # Build the manager binary -FROM --platform=$BUILDPLATFORM golang:1.20.2 as builder +FROM --platform=$BUILDPLATFORM golang:1.22.0 as builder WORKDIR /shifu diff --git a/examples/deviceshifu/mockdevice/socket/Dockerfile.mockdevice-socket b/examples/deviceshifu/mockdevice/socket/Dockerfile.mockdevice-socket index 4c79cff39..efc9799ad 100644 --- a/examples/deviceshifu/mockdevice/socket/Dockerfile.mockdevice-socket +++ b/examples/deviceshifu/mockdevice/socket/Dockerfile.mockdevice-socket @@ -1,4 +1,4 @@ -FROM --platform=$BUILDPLATFORM golang:1.20.2 as builder +FROM --platform=$BUILDPLATFORM golang:1.22.0 as builder WORKDIR /shifu ENV GO111MODULE=on diff --git a/examples/deviceshifu/mockdevice/thermometer/Dockerfile.mockdevice-thermometer b/examples/deviceshifu/mockdevice/thermometer/Dockerfile.mockdevice-thermometer index 8f5d3ca19..8a7bcfa70 100644 --- a/examples/deviceshifu/mockdevice/thermometer/Dockerfile.mockdevice-thermometer +++ b/examples/deviceshifu/mockdevice/thermometer/Dockerfile.mockdevice-thermometer @@ -1,5 +1,5 @@ # Build the manager binary -FROM --platform=$BUILDPLATFORM golang:1.20.2 as builder +FROM --platform=$BUILDPLATFORM golang:1.22.0 as builder WORKDIR /shifu diff --git a/examples/driver_utils/simple-alpine/Dockerfile.sample b/examples/driver_utils/simple-alpine/Dockerfile.sample index d99581b71..b1ddcc6ca 100644 --- a/examples/driver_utils/simple-alpine/Dockerfile.sample +++ b/examples/driver_utils/simple-alpine/Dockerfile.sample @@ -1,4 +1,4 @@ -FROM golang:1.20.2 as builder +FROM golang:1.22.0 as builder WORKDIR / diff --git a/examples/telemetryservice/mockclient/Dockerfile.mockclient b/examples/telemetryservice/mockclient/Dockerfile.mockclient index 452a2ae23..9de46c4e4 100644 --- a/examples/telemetryservice/mockclient/Dockerfile.mockclient +++ b/examples/telemetryservice/mockclient/Dockerfile.mockclient @@ -1,4 +1,4 @@ -FROM --platform=$BUILDPLATFORM golang:1.20.2 as builder +FROM --platform=$BUILDPLATFORM golang:1.22.0 as builder WORKDIR /mockclient diff --git a/examples/telemetryservice/mockserver/Dockerfile.mockserver b/examples/telemetryservice/mockserver/Dockerfile.mockserver index 3f989c0a6..72ce81678 100644 --- a/examples/telemetryservice/mockserver/Dockerfile.mockserver +++ b/examples/telemetryservice/mockserver/Dockerfile.mockserver @@ -1,4 +1,4 @@ -FROM --platform=$BUILDPLATFORM golang:1.20.2 as builder +FROM --platform=$BUILDPLATFORM golang:1.22.0 as builder WORKDIR /mockserver diff --git a/pkg/k8s/crd/Dockerfile b/pkg/k8s/crd/Dockerfile index 32621bef4..490dd53b6 100644 --- a/pkg/k8s/crd/Dockerfile +++ b/pkg/k8s/crd/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM --platform=$BUILDPLATFORM golang:1.20.2 as builder +FROM --platform=$BUILDPLATFORM golang:1.22.0 as builder ENV GO111MODULE=on ENV GOPRIVATE=github.com/Edgenesis From bf00fcc460b2472a4d67c2743c63a810ee8f61f0 Mon Sep 17 00:00:00 2001 From: ~tong <1454579997@qq.com> Date: Thu, 29 Feb 2024 10:16:22 +0800 Subject: [PATCH 03/11] debug --- azure-pipelines/azure-pipelines.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/azure-pipelines/azure-pipelines.yml b/azure-pipelines/azure-pipelines.yml index dfa29f2ba..9506ad86b 100644 --- a/azure-pipelines/azure-pipelines.yml +++ b/azure-pipelines/azure-pipelines.yml @@ -91,6 +91,9 @@ stages: tag=`cat version.txt` && echo "##vso[task.setvariable variable=tag]$tag" displayName: Set the tag name as an environment variable - script: | + go env + ehco =========== + go env GOARCH make buildx-build-image-shifu-controller displayName: build edgehub/shifu-controller - script: | From e2d9cb123d6ed2d19bafb3e131949d3830a5b02d Mon Sep 17 00:00:00 2001 From: ~tong <1454579997@qq.com> Date: Thu, 29 Feb 2024 10:23:25 +0800 Subject: [PATCH 04/11] debug --- azure-pipelines/azure-pipelines.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/azure-pipelines/azure-pipelines.yml b/azure-pipelines/azure-pipelines.yml index 9506ad86b..d991ab1a5 100644 --- a/azure-pipelines/azure-pipelines.yml +++ b/azure-pipelines/azure-pipelines.yml @@ -87,6 +87,9 @@ stages: - job: kind_e2e_test_http steps: + - task: GoTool@0 + inputs: + version: '1.22.0' - script: | tag=`cat version.txt` && echo "##vso[task.setvariable variable=tag]$tag" displayName: Set the tag name as an environment variable From ffe0f6dd110e6f5e82edf25df1ca912db42f6f2d Mon Sep 17 00:00:00 2001 From: ~tong <1454579997@qq.com> Date: Thu, 29 Feb 2024 10:29:28 +0800 Subject: [PATCH 05/11] debug --- azure-pipelines/azure-pipelines.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/azure-pipelines/azure-pipelines.yml b/azure-pipelines/azure-pipelines.yml index d991ab1a5..836bf7cb4 100644 --- a/azure-pipelines/azure-pipelines.yml +++ b/azure-pipelines/azure-pipelines.yml @@ -171,6 +171,9 @@ stages: - job: kind_e2e_test_opcua steps: + - task: GoTool@0 + inputs: + version: '1.22.0' - script: | tag=`cat version.txt` && echo "##vso[task.setvariable variable=tag]$tag" displayName: Set the tag name as an environment variable @@ -211,6 +214,9 @@ stages: - job: kind_e2e_test_socket steps: + - task: GoTool@0 + inputs: + version: '1.22.0' - script: | tag=`cat version.txt` && echo "##vso[task.setvariable variable=tag]$tag" displayName: Set the tag name as an environment variable @@ -251,6 +257,9 @@ stages: - job: kind_e2e_test_mqtt steps: + - task: GoTool@0 + inputs: + version: '1.22.0' - script: | tag=`cat version.txt` && echo "##vso[task.setvariable variable=tag]$tag" displayName: Set the tag name as an environment variable @@ -287,6 +296,9 @@ stages: - job: kind_e2e_test_customized steps: + - task: GoTool@0 + inputs: + version: '1.22.0' - script: | tag=`cat version.txt` && echo "##vso[task.setvariable variable=tag]$tag" displayName: Set the tag name as an environment variable @@ -338,6 +350,9 @@ stages: - job: build_test_plc4x steps: + - task: GoTool@0 + inputs: + version: '1.22.0' - script: | tag=`cat version.txt` && echo "##vso[task.setvariable variable=tag]$tag" displayName: Set the tag name as an environment variable From b9d04432664b343d14d8084e7566d543e1365292 Mon Sep 17 00:00:00 2001 From: ~tong <1454579997@qq.com> Date: Thu, 29 Feb 2024 10:48:11 +0800 Subject: [PATCH 06/11] debug --- azure-pipelines/azure-pipelines.yml | 3 --- dockerfiles/Dockerfile.deviceshifuPLC4X | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/azure-pipelines/azure-pipelines.yml b/azure-pipelines/azure-pipelines.yml index 836bf7cb4..0c412b1c2 100644 --- a/azure-pipelines/azure-pipelines.yml +++ b/azure-pipelines/azure-pipelines.yml @@ -94,9 +94,6 @@ stages: tag=`cat version.txt` && echo "##vso[task.setvariable variable=tag]$tag" displayName: Set the tag name as an environment variable - script: | - go env - ehco =========== - go env GOARCH make buildx-build-image-shifu-controller displayName: build edgehub/shifu-controller - script: | diff --git a/dockerfiles/Dockerfile.deviceshifuPLC4X b/dockerfiles/Dockerfile.deviceshifuPLC4X index 09acdba53..0fdc4970c 100644 --- a/dockerfiles/Dockerfile.deviceshifuPLC4X +++ b/dockerfiles/Dockerfile.deviceshifuPLC4X @@ -1,5 +1,5 @@ # Build the manager binary -FROM --platform=$TARGETPLATFORM golang:1.22.0-buster as builder +FROM --platform=$TARGETPLATFORM golang:1.22.0-alpine as builder WORKDIR /shifu From 70d3728a8cac42227951cfee3b0c3425e9c4ea6b Mon Sep 17 00:00:00 2001 From: ~tong <1454579997@qq.com> Date: Thu, 29 Feb 2024 10:54:34 +0800 Subject: [PATCH 07/11] debug --- dockerfiles/Dockerfile.deviceshifuPLC4X | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockerfiles/Dockerfile.deviceshifuPLC4X b/dockerfiles/Dockerfile.deviceshifuPLC4X index 0fdc4970c..11ffa286f 100644 --- a/dockerfiles/Dockerfile.deviceshifuPLC4X +++ b/dockerfiles/Dockerfile.deviceshifuPLC4X @@ -1,5 +1,5 @@ # Build the manager binary -FROM --platform=$TARGETPLATFORM golang:1.22.0-alpine as builder +FROM --platform=$TARGETPLATFORM golang:1.22.0-bullseye as builder WORKDIR /shifu From 24d253e10b030d277888240f9b5c8e8eecd84c9b Mon Sep 17 00:00:00 2001 From: ~tong <1454579997@qq.com> Date: Thu, 29 Feb 2024 13:26:28 +0800 Subject: [PATCH 08/11] debug --- dockerfiles/Dockerfile.deviceshifuPLC4X | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockerfiles/Dockerfile.deviceshifuPLC4X b/dockerfiles/Dockerfile.deviceshifuPLC4X index 11ffa286f..4b57ab97f 100644 --- a/dockerfiles/Dockerfile.deviceshifuPLC4X +++ b/dockerfiles/Dockerfile.deviceshifuPLC4X @@ -1,5 +1,5 @@ # Build the manager binary -FROM --platform=$TARGETPLATFORM golang:1.22.0-bullseye as builder +FROM --platform=$TARGETPLATFORM golang:1.22.0 as builder WORKDIR /shifu From 07e528716889375b1bb2699312ca416c47339112 Mon Sep 17 00:00:00 2001 From: ~tong <1454579997@qq.com> Date: Thu, 29 Feb 2024 13:49:46 +0800 Subject: [PATCH 09/11] debug --- dockerfiles/Dockerfile.deviceshifuPLC4X | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/dockerfiles/Dockerfile.deviceshifuPLC4X b/dockerfiles/Dockerfile.deviceshifuPLC4X index 4b57ab97f..807e6e400 100644 --- a/dockerfiles/Dockerfile.deviceshifuPLC4X +++ b/dockerfiles/Dockerfile.deviceshifuPLC4X @@ -1,5 +1,14 @@ +# Install apt-get +FROM ubuntu:20.04 +RUN apt-get update && apt-get install -y apt-utils +RUN apt-get install -y vim + # Build the manager binary -FROM --platform=$TARGETPLATFORM golang:1.22.0 as builder +FROM --platform=$TARGETPLATFORM golang:1.22.0-alpine as builder + +COPY --from(builder) /usr/bin/apt-get /usr/bin/apt-get +COPY --from(builder) /etc/apt/sources.list /etc/apt/sources.list +CMD ["apt-get", "update"] WORKDIR /shifu From a02b16a6e876eef4e847764d10a7243f3fb87f75 Mon Sep 17 00:00:00 2001 From: ~tong <1454579997@qq.com> Date: Thu, 29 Feb 2024 14:57:16 +0800 Subject: [PATCH 10/11] debug --- dockerfiles/Dockerfile.deviceshifuPLC4X | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dockerfiles/Dockerfile.deviceshifuPLC4X b/dockerfiles/Dockerfile.deviceshifuPLC4X index 807e6e400..cabc9c465 100644 --- a/dockerfiles/Dockerfile.deviceshifuPLC4X +++ b/dockerfiles/Dockerfile.deviceshifuPLC4X @@ -1,13 +1,13 @@ # Install apt-get -FROM ubuntu:20.04 +FROM ubuntu:20.04 as utils RUN apt-get update && apt-get install -y apt-utils RUN apt-get install -y vim # Build the manager binary FROM --platform=$TARGETPLATFORM golang:1.22.0-alpine as builder -COPY --from(builder) /usr/bin/apt-get /usr/bin/apt-get -COPY --from(builder) /etc/apt/sources.list /etc/apt/sources.list +COPY --from=utils /usr/bin/apt-get /usr/bin/apt-get +COPY --from=utils /etc/apt/sources.list /etc/apt/sources.list CMD ["apt-get", "update"] WORKDIR /shifu From b8dfa82d52359e6d485a317944076731b0d2e975 Mon Sep 17 00:00:00 2001 From: ~tong <1454579997@qq.com> Date: Thu, 29 Feb 2024 18:23:14 +0800 Subject: [PATCH 11/11] debug --- dockerfiles/Dockerfile.deviceshifuPLC4X | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/dockerfiles/Dockerfile.deviceshifuPLC4X b/dockerfiles/Dockerfile.deviceshifuPLC4X index cabc9c465..e318cbf12 100644 --- a/dockerfiles/Dockerfile.deviceshifuPLC4X +++ b/dockerfiles/Dockerfile.deviceshifuPLC4X @@ -1,14 +1,5 @@ -# Install apt-get -FROM ubuntu:20.04 as utils -RUN apt-get update && apt-get install -y apt-utils -RUN apt-get install -y vim - # Build the manager binary -FROM --platform=$TARGETPLATFORM golang:1.22.0-alpine as builder - -COPY --from=utils /usr/bin/apt-get /usr/bin/apt-get -COPY --from=utils /etc/apt/sources.list /etc/apt/sources.list -CMD ["apt-get", "update"] +FROM --platform=$TARGETPLATFORM golang:1.20.2-buster as builder WORKDIR /shifu