git001 / caddyv2-upload

This repo holds a simple caddyserver v2 upload handler
Apache License 2.0
22 stars 6 forks source link

The upload handler refuses to build with latest caddy #3

Closed etherwvlf closed 1 year ago

etherwvlf commented 1 year ago

The upload handler refuses to build with the latest caddy using xcaddy. It is easy to reproduce using the following command:

xcaddy build --with github.com/kirsch33/realip --with github.com/caddyserver/jsonc-adapter --with github.com/git001/caddyv2-upload --with github.com/caddyserver/transform-encoder

and it fails me giving the following output: Screenshot_2023-02-20_21-02-17

I tried editing go.mod searching for

github.com/google/pprof

in attempt to remove it but I can't seem to find it referenced there. Apparently something else pulls it but that is clearly beyond me.

gedw99 commented 1 year ago

What version of x asst are you using ?

etherwvlf commented 1 year ago

What is "x asst" ?

git001 commented 1 year ago

What is "x asst" ?

xcaddy

Also what's your golang version

etherwvlf commented 1 year ago

xcaddy v0.3.2 h1:Y1QPKq97GrSG6ryMhGTw1g9GHH8wRmwnCzOcN+f+gCY= go1.20.1

gedw99 commented 1 year ago

Sorry @etherwvlf I did mean to write xcaddy. Was on mobile with wrong language on keyboard .

git001 commented 1 year ago

@etherwvlf I can reproduce the error, dig in it to fix it

etherwvlf commented 1 year ago

Even https://caddyserver.com/download cannot build a binary and just hangs if I add the upload module as an extra feature so it is not just me.

gedw99 commented 1 year ago

Even https://caddyserver.com/download cannot build a binary and just hangs if I add the upload module as an extra feature so it is not just me.

It’s a common thing or other caddy modules too. Just how it is

etherwvlf commented 1 year ago

Well, I'll spin up a virtual machine with fresh Debian and try to see if I get the same error... I cannot think of anything else to try atm.

git001 commented 1 year ago

the problem is that the build process still uses the old commit and I need to check how to tell go/xcaddy to use the new commit https://github.com/git001/caddyv2-upload/commit/abf858dc0f3bdf3b84798c8abc67a5c5d54a5a14 instead of the old one

go: downloading github.com/git001/caddyv2-upload v0.0.0-20220820181510-8de6484e90e1
/datadisk/git-repos/caddyv2-upload # buildah bud --tag caddyv2-upload .
WARN[0000] Failed to decode the keys ["machine"] from "/usr/share/containers/containers.conf". 
WARN[0000] Failed to decode the keys ["machine"] from "/usr/share/containers/containers.conf". 
STEP 1/6: FROM ubuntu:latest
STEP 2/6: ENV XCADDY_VERSION=0.3.2     GOLANG_VERSION=20.1     APPPORT=:2011     UPLOADER_VERSION=0.9
STEP 3/6: COPY docker-files /
STEP 4/6: RUN set -x   && apt-get -y update   && apt-get install -y curl   && mkdir build   && cd build   && curl -sSLO https://github.com/caddyserver/xcaddy/releases/download/v${XCADDY_VERSION}/xcaddy_${XCADDY_VERSION}_linux_amd64.tar.gz   && curl -sSLO https://go.dev/dl/go1.${GOLANG_VERSION}.linux-amd64.tar.gz   && rm -rf /usr/local/go   && tar -C /usr/local -xzf go1.${GOLANG_VERSION}.linux-amd64.tar.gz   && export PATH=$PATH:/usr/local/go/bin   && tar xfvz xcaddy_${XCADDY_VERSION}_linux_amd64.tar.gz   && ./xcaddy build --with github.com/kirsch33/realip     --with github.com/git001/caddyv2-upload   && pwd   && mv caddy /usr/local/bin/   && cd ..   && apt-get -y autoremove   && apt-get -y autoclean   && rm -rf build /usr/local/go /var/cache/apk/* root/.cache root/go/   && /usr/local/bin/caddy list-modules
WARN[0000] Failed to decode the keys ["machine"] from "/usr/share/containers/containers.conf". 
+ apt-get -y update
Get:1 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Get:2 http://archive.ubuntu.com/ubuntu jammy InRelease [270 kB]
Get:3 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages [752 kB]
Get:4 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 Packages [5557 B]
Get:5 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [860 kB]
Get:6 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [807 kB]
Get:7 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB]
Get:8 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [107 kB]
Get:9 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages [1792 kB]
Get:10 http://archive.ubuntu.com/ubuntu jammy/multiverse amd64 Packages [266 kB]
Get:11 http://archive.ubuntu.com/ubuntu jammy/restricted amd64 Packages [164 kB]
Get:12 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages [17.5 MB]
Get:13 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [1136 kB]
Get:14 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [1091 kB]
Get:15 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [808 kB]
Get:16 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 Packages [10.9 kB]
Get:17 http://archive.ubuntu.com/ubuntu jammy-backports/main amd64 Packages [49.0 kB]
Get:18 http://archive.ubuntu.com/ubuntu jammy-backports/universe amd64 Packages [22.4 kB]
Fetched 25.8 MB in 3s (7464 kB/s)
Reading package lists...
+ apt-get install -y curl
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  ca-certificates libbrotli1 libcurl4 libldap-2.5-0 libldap-common
  libnghttp2-14 libpsl5 librtmp1 libsasl2-2 libsasl2-modules
  libsasl2-modules-db libssh-4 openssl publicsuffix
Suggested packages:
  libsasl2-modules-gssapi-mit | libsasl2-modules-gssapi-heimdal
  libsasl2-modules-ldap libsasl2-modules-otp libsasl2-modules-sql
The following NEW packages will be installed:
  ca-certificates curl libbrotli1 libcurl4 libldap-2.5-0 libldap-common
  libnghttp2-14 libpsl5 librtmp1 libsasl2-2 libsasl2-modules
  libsasl2-modules-db libssh-4 openssl publicsuffix
0 upgraded, 15 newly installed, 0 to remove and 6 not upgraded.
Need to get 2964 kB of archives.
After this operation, 7048 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 openssl amd64 3.0.2-0ubuntu1.8 [1184 kB]
Get:2 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 ca-certificates all 20211016ubuntu0.22.04.1 [144 kB]
Get:3 http://archive.ubuntu.com/ubuntu jammy/main amd64 libnghttp2-14 amd64 1.43.0-1build3 [76.3 kB]
Get:4 http://archive.ubuntu.com/ubuntu jammy/main amd64 libpsl5 amd64 0.21.0-1.2build2 [58.4 kB]
Get:5 http://archive.ubuntu.com/ubuntu jammy/main amd64 publicsuffix all 20211207.1025-1 [129 kB]
Get:6 http://archive.ubuntu.com/ubuntu jammy/main amd64 libbrotli1 amd64 1.0.9-2build6 [315 kB]
Get:7 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libsasl2-modules-db amd64 2.1.27+dfsg2-3ubuntu1.1 [20.6 kB]
Get:8 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libsasl2-2 amd64 2.1.27+dfsg2-3ubuntu1.1 [53.8 kB]
Get:9 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libldap-2.5-0 amd64 2.5.13+dfsg-0ubuntu0.22.04.1 [183 kB]
Get:10 http://archive.ubuntu.com/ubuntu jammy/main amd64 librtmp1 amd64 2.4+20151223.gitfa8646d.1-2build4 [58.2 kB]
Get:11 http://archive.ubuntu.com/ubuntu jammy/main amd64 libssh-4 amd64 0.9.6-2build1 [184 kB]
Get:12 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libcurl4 amd64 7.81.0-1ubuntu1.7 [289 kB]
Get:13 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 curl amd64 7.81.0-1ubuntu1.7 [193 kB]
Get:14 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libldap-common all 2.5.13+dfsg-0ubuntu0.22.04.1 [15.9 kB]
Get:15 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libsasl2-modules amd64 2.1.27+dfsg2-3ubuntu1.1 [57.2 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 2964 kB in 2s (1394 kB/s)
Selecting previously unselected package openssl.
(Reading database ... 4395 files and directories currently installed.)
Preparing to unpack .../00-openssl_3.0.2-0ubuntu1.8_amd64.deb ...
Unpacking openssl (3.0.2-0ubuntu1.8) ...
Selecting previously unselected package ca-certificates.
Preparing to unpack .../01-ca-certificates_20211016ubuntu0.22.04.1_all.deb ...
Unpacking ca-certificates (20211016ubuntu0.22.04.1) ...
Selecting previously unselected package libnghttp2-14:amd64.
Preparing to unpack .../02-libnghttp2-14_1.43.0-1build3_amd64.deb ...
Unpacking libnghttp2-14:amd64 (1.43.0-1build3) ...
Selecting previously unselected package libpsl5:amd64.
Preparing to unpack .../03-libpsl5_0.21.0-1.2build2_amd64.deb ...
Unpacking libpsl5:amd64 (0.21.0-1.2build2) ...
Selecting previously unselected package publicsuffix.
Preparing to unpack .../04-publicsuffix_20211207.1025-1_all.deb ...
Unpacking publicsuffix (20211207.1025-1) ...
Selecting previously unselected package libbrotli1:amd64.
Preparing to unpack .../05-libbrotli1_1.0.9-2build6_amd64.deb ...
Unpacking libbrotli1:amd64 (1.0.9-2build6) ...
Selecting previously unselected package libsasl2-modules-db:amd64.
Preparing to unpack .../06-libsasl2-modules-db_2.1.27+dfsg2-3ubuntu1.1_amd64.deb ...
Unpacking libsasl2-modules-db:amd64 (2.1.27+dfsg2-3ubuntu1.1) ...
Selecting previously unselected package libsasl2-2:amd64.
Preparing to unpack .../07-libsasl2-2_2.1.27+dfsg2-3ubuntu1.1_amd64.deb ...
Unpacking libsasl2-2:amd64 (2.1.27+dfsg2-3ubuntu1.1) ...
Selecting previously unselected package libldap-2.5-0:amd64.
Preparing to unpack .../08-libldap-2.5-0_2.5.13+dfsg-0ubuntu0.22.04.1_amd64.deb ...
Unpacking libldap-2.5-0:amd64 (2.5.13+dfsg-0ubuntu0.22.04.1) ...
Selecting previously unselected package librtmp1:amd64.
Preparing to unpack .../09-librtmp1_2.4+20151223.gitfa8646d.1-2build4_amd64.deb ...
Unpacking librtmp1:amd64 (2.4+20151223.gitfa8646d.1-2build4) ...
Selecting previously unselected package libssh-4:amd64.
Preparing to unpack .../10-libssh-4_0.9.6-2build1_amd64.deb ...
Unpacking libssh-4:amd64 (0.9.6-2build1) ...
Selecting previously unselected package libcurl4:amd64.
Preparing to unpack .../11-libcurl4_7.81.0-1ubuntu1.7_amd64.deb ...
Unpacking libcurl4:amd64 (7.81.0-1ubuntu1.7) ...
Selecting previously unselected package curl.
Preparing to unpack .../12-curl_7.81.0-1ubuntu1.7_amd64.deb ...
Unpacking curl (7.81.0-1ubuntu1.7) ...
Selecting previously unselected package libldap-common.
Preparing to unpack .../13-libldap-common_2.5.13+dfsg-0ubuntu0.22.04.1_all.deb ...
Unpacking libldap-common (2.5.13+dfsg-0ubuntu0.22.04.1) ...
Selecting previously unselected package libsasl2-modules:amd64.
Preparing to unpack .../14-libsasl2-modules_2.1.27+dfsg2-3ubuntu1.1_amd64.deb ...
Unpacking libsasl2-modules:amd64 (2.1.27+dfsg2-3ubuntu1.1) ...
Setting up libpsl5:amd64 (0.21.0-1.2build2) ...
Setting up libbrotli1:amd64 (1.0.9-2build6) ...
Setting up libsasl2-modules:amd64 (2.1.27+dfsg2-3ubuntu1.1) ...
Setting up libnghttp2-14:amd64 (1.43.0-1build3) ...
Setting up libldap-common (2.5.13+dfsg-0ubuntu0.22.04.1) ...
Setting up libsasl2-modules-db:amd64 (2.1.27+dfsg2-3ubuntu1.1) ...
Setting up librtmp1:amd64 (2.4+20151223.gitfa8646d.1-2build4) ...
Setting up libsasl2-2:amd64 (2.1.27+dfsg2-3ubuntu1.1) ...
Setting up libssh-4:amd64 (0.9.6-2build1) ...
Setting up openssl (3.0.2-0ubuntu1.8) ...
Setting up publicsuffix (20211207.1025-1) ...
Setting up libldap-2.5-0:amd64 (2.5.13+dfsg-0ubuntu0.22.04.1) ...
Setting up ca-certificates (20211016ubuntu0.22.04.1) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.34.0 /usr/local/share/perl/5.34.0 /usr/lib/x86_64-linux-gnu/perl5/5.34 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.34 /usr/share/perl/5.34 /usr/local/lib/site_perl) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
Updating certificates in /etc/ssl/certs...
124 added, 0 removed; done.
Setting up libcurl4:amd64 (7.81.0-1ubuntu1.7) ...
Setting up curl (7.81.0-1ubuntu1.7) ...
Processing triggers for libc-bin (2.35-0ubuntu3.1) ...
Processing triggers for ca-certificates (20211016ubuntu0.22.04.1) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
+ mkdir build
+ cd build
+ curl -sSLO https://github.com/caddyserver/xcaddy/releases/download/v0.3.2/xcaddy_0.3.2_linux_amd64.tar.gz
+ curl -sSLO https://go.dev/dl/go1.20.1.linux-amd64.tar.gz
+ rm -rf /usr/local/go
+ tar -C /usr/local -xzf go1.20.1.linux-amd64.tar.gz
+ export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin
+ tar xfvz xcaddy_0.3.2_linux_amd64.tar.gz
LICENSE
README.md
xcaddy
+ ./xcaddy build --with github.com/kirsch33/realip --with github.com/git001/caddyv2-upload
2023/02/21 10:34:20 [INFO] Temporary folder: /tmp/buildenv_2023-02-21-1034.1437272474
2023/02/21 10:34:20 [INFO] Writing main module: /tmp/buildenv_2023-02-21-1034.1437272474/main.go
package main

import (
    caddycmd "github.com/caddyserver/caddy/v2/cmd"

    // plug in Caddy modules here
    _ "github.com/caddyserver/caddy/v2/modules/standard"
    _ "github.com/kirsch33/realip"
    _ "github.com/git001/caddyv2-upload"
)

func main() {
    caddycmd.Main()
}
2023/02/21 10:34:20 [INFO] Initializing Go module
2023/02/21 10:34:20 [INFO] exec (timeout=10s): /usr/local/go/bin/go mod init caddy 
go: creating new go.mod: module caddy
go: to add module requirements and sums:
    go mod tidy
2023/02/21 10:34:20 [INFO] Pinning versions
2023/02/21 10:34:20 [INFO] exec (timeout=0s): /usr/local/go/bin/go get -d -v github.com/caddyserver/caddy/v2 
go: downloading github.com/caddyserver/caddy v1.0.5
go: downloading github.com/caddyserver/caddy/v2 v2.6.4
go: downloading github.com/caddyserver/certmagic v0.17.2
go: downloading github.com/google/uuid v1.3.0
go: downloading github.com/prometheus/client_golang v1.14.0
go: downloading github.com/quic-go/quic-go v0.32.0
go: downloading go.uber.org/zap v1.24.0
go: downloading golang.org/x/sys v0.5.0
go: downloading golang.org/x/term v0.5.0
go: downloading github.com/klauspost/cpuid/v2 v2.2.3
go: downloading github.com/libdns/libdns v0.2.1
go: downloading github.com/mholt/acmez v1.1.0
go: downloading github.com/miekg/dns v1.1.50
go: downloading golang.org/x/crypto v0.5.0
go: downloading golang.org/x/net v0.7.0
go: downloading go.uber.org/atomic v1.9.0
go: downloading go.uber.org/multierr v1.6.0
go: downloading github.com/beorn7/perks v1.0.1
go: downloading github.com/cespare/xxhash/v2 v2.1.2
go: downloading github.com/golang/protobuf v1.5.2
go: downloading github.com/prometheus/client_model v0.3.0
go: downloading github.com/prometheus/common v0.37.0
go: downloading github.com/cespare/xxhash v1.1.0
go: downloading github.com/prometheus/procfs v0.8.0
go: downloading google.golang.org/protobuf v1.28.1
go: downloading github.com/golang/mock v1.6.0
go: downloading github.com/onsi/ginkgo/v2 v2.2.0
go: downloading github.com/quic-go/qpack v0.4.0
go: downloading golang.org/x/tools v0.2.0
go: downloading github.com/matttproud/golang_protobuf_extensions v1.0.1
go: downloading golang.org/x/exp v0.0.0-20221205204356-47842c84f3db
go: downloading golang.org/x/text v0.7.0
go: downloading github.com/quic-go/qtls-go1-18 v0.2.0
go: downloading github.com/quic-go/qtls-go1-19 v0.2.0
go: downloading github.com/quic-go/qtls-go1-20 v0.1.0
go: downloading golang.org/x/mod v0.6.0
go: downloading github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0
go: downloading github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38
go: added github.com/beorn7/perks v1.0.1
go: added github.com/caddyserver/caddy/v2 v2.6.4
go: added github.com/caddyserver/certmagic v0.17.2
go: added github.com/cespare/xxhash/v2 v2.1.2
go: added github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0
go: added github.com/golang/mock v1.6.0
go: added github.com/golang/protobuf v1.5.2
go: added github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38
go: added github.com/google/uuid v1.3.0
go: added github.com/klauspost/cpuid/v2 v2.2.3
go: added github.com/libdns/libdns v0.2.1
go: added github.com/matttproud/golang_protobuf_extensions v1.0.1
go: added github.com/mholt/acmez v1.1.0
go: added github.com/miekg/dns v1.1.50
go: added github.com/onsi/ginkgo/v2 v2.2.0
go: added github.com/prometheus/client_golang v1.14.0
go: added github.com/prometheus/client_model v0.3.0
go: added github.com/prometheus/common v0.37.0
go: added github.com/prometheus/procfs v0.8.0
go: added github.com/quic-go/qpack v0.4.0
go: added github.com/quic-go/qtls-go1-18 v0.2.0
go: added github.com/quic-go/qtls-go1-19 v0.2.0
go: added github.com/quic-go/qtls-go1-20 v0.1.0
go: added github.com/quic-go/quic-go v0.32.0
go: added go.uber.org/atomic v1.9.0
go: added go.uber.org/multierr v1.6.0
go: added go.uber.org/zap v1.24.0
go: added golang.org/x/crypto v0.5.0
go: added golang.org/x/exp v0.0.0-20221205204356-47842c84f3db
go: added golang.org/x/mod v0.6.0
go: added golang.org/x/net v0.7.0
go: added golang.org/x/sys v0.5.0
go: added golang.org/x/term v0.5.0
go: added golang.org/x/text v0.7.0
go: added golang.org/x/tools v0.2.0
go: added google.golang.org/protobuf v1.28.1
2023/02/21 10:34:28 [INFO] exec (timeout=0s): /usr/local/go/bin/go get -d -v github.com/kirsch33/realip github.com/caddyserver/caddy/v2 
go: downloading github.com/kirsch33/realip v1.6.1
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading github.com/google/cel-go v0.13.0
go: downloading google.golang.org/genproto v0.0.0-20230202175211-008b39050e57
go: downloading github.com/smallstep/certificates v0.23.2
go: downloading github.com/smallstep/truststore v0.12.1
go: downloading go.step.sm/crypto v0.23.2
go: downloading github.com/tailscale/tscert v0.0.0-20230124224810-c6dc1f4049b2
go: downloading github.com/aryann/difflib v0.0.0-20210328193216-ff5ff6dc229b
go: downloading github.com/spf13/cobra v1.6.1
go: downloading github.com/spf13/pflag v1.0.5
go: downloading github.com/antlr/antlr4/runtime/Go/antlr v1.4.10
go: downloading github.com/stoewer/go-strcase v1.2.0
go: downloading howett.net/plist v1.0.0
go: downloading github.com/pkg/errors v0.9.1
go: downloading github.com/smallstep/nosql v0.5.0
go: downloading go.step.sm/cli-utils v0.7.5
go: downloading go.step.sm/linkedca v0.19.0
go: downloading google.golang.org/grpc v1.52.3
go: downloading gopkg.in/square/go-jose.v2 v2.6.0
go: downloading github.com/antlr/antlr4 v0.0.0-20200503195918-621b933c7a7f
go: downloading github.com/slackhq/nebula v1.6.1
go: downloading github.com/Microsoft/go-winio v0.6.0
go: downloading github.com/mitchellh/go-ps v1.0.0
go: downloading filippo.io/edwards25519 v1.0.0
go: downloading github.com/Masterminds/sprig/v3 v3.2.3
go: downloading github.com/micromdm/scep/v2 v2.1.0
go: downloading go.mozilla.org/pkcs7 v0.0.0-20210826202110-33d05740a352
go: downloading github.com/inconshreveable/mousetrap v1.0.1
go: downloading github.com/cpuguy83/go-md2man/v2 v2.0.2
go: downloading gopkg.in/yaml.v3 v3.0.1
go: downloading github.com/Masterminds/sprig v2.22.0+incompatible
go: downloading github.com/cpuguy83/go-md2man v1.0.10
go: downloading github.com/urfave/cli v1.22.12
go: downloading github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e
go: downloading github.com/manifoldco/promptui v0.9.0
go: downloading github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22
go: downloading github.com/go-kit/kit v0.10.0
go: downloading github.com/dgraph-io/badger v1.6.2
go: downloading github.com/dgraph-io/badger/v2 v2.2007.4
go: downloading go.etcd.io/bbolt v1.3.6
go: downloading github.com/go-sql-driver/mysql v1.6.0
go: downloading github.com/jackc/pgx/v4 v4.17.2
go: downloading github.com/Masterminds/goutils v1.1.1
go: downloading github.com/Masterminds/semver/v3 v3.2.0
go: downloading github.com/huandu/xstrings v1.3.3
go: downloading github.com/imdario/mergo v0.3.12
go: downloading github.com/mitchellh/copystructure v1.2.0
go: downloading github.com/shopspring/decimal v1.2.0
go: downloading github.com/spf13/cast v1.4.1
go: downloading github.com/russross/blackfriday/v2 v2.1.0
go: downloading github.com/dgraph-io/ristretto v0.1.0
go: downloading github.com/go-logfmt/logfmt v0.5.1
go: downloading github.com/Masterminds/semver v1.5.0
go: downloading github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13
go: downloading github.com/mitchellh/reflectwalk v1.0.2
go: downloading github.com/jackc/pgconn v1.13.0
go: downloading github.com/jackc/pgio v1.0.0
go: downloading github.com/jackc/pgproto3/v2 v2.3.1
go: downloading github.com/jackc/pgtype v1.12.0
go: downloading github.com/russross/blackfriday v1.5.2
go: downloading github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d
go: downloading github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96
go: downloading github.com/golang/snappy v0.0.4
go: downloading github.com/klauspost/compress v1.15.15
go: downloading github.com/jackc/chunkreader/v2 v2.0.1
go: downloading github.com/jackc/pgpassfile v1.0.0
go: downloading github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b
go: downloading github.com/shurcooL/sanitized_anchor_name v1.0.0
go: downloading github.com/golang/glog v1.0.0
go: downloading github.com/mattn/go-colorable v0.1.8
go: downloading github.com/mattn/go-isatty v0.0.13
go: downloading github.com/antlr/antlr4 v4.11.1+incompatible
go: upgraded github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 => v0.0.0-20210601050228-01bbb1931b22
go: added github.com/kirsch33/realip v1.6.1
2023/02/21 10:34:41 [INFO] exec (timeout=0s): /usr/local/go/bin/go get -d -v github.com/git001/caddyv2-upload github.com/caddyserver/caddy/v2 

# I think this is the error
go: downloading github.com/git001/caddyv2-upload v0.0.0-20220820181510-8de6484e90e1

panic: internal error: can't find reason for requirement on github.com/google/pprof@v0.0.0-20210601050228-01bbb1931b22

goroutine 1 [running]:
cmd/go/internal/modget.(*resolver).updateBuildList.func1({{0xc000715038, 0x17}, {0xc0000c6600, 0x22}})
    /usr/local/go/src/cmd/go/internal/modget/get.go:1760 +0xd4
cmd/go/internal/modget.(*resolver).updateBuildList(0xc000758000, {0xb3bd58, 0xc0000a8000}, {0x0, 0x0, 0x0})
    /usr/local/go/src/cmd/go/internal/modget/get.go:1765 +0x54c
cmd/go/internal/modget.(*resolver).resolveQueries(0xc000758000, {0xb3bd58, 0xc0000a8000}, {0xc0000a05c0, 0x2, 0xc0000afd70?})
    /usr/local/go/src/cmd/go/internal/modget/get.go:1243 +0x1b1
cmd/go/internal/modget.runGet({0xb3bd58, 0xc0000a8000}, 0xc0000cc528?, {0xc0000bc160, 0x2, 0x2})
    /usr/local/go/src/cmd/go/internal/modget/get.go:314 +0x408
main.invoke(0xe522a0, {0xc0000bc130, 0x5, 0x5})
    /usr/local/go/src/cmd/go/main.go:225 +0x3d9
main.main()
    /usr/local/go/src/cmd/go/main.go:179 +0x7ce
2023/02/21 10:34:43 [FATAL] exit status 2
error building at STEP "RUN set -x   && apt-get -y update   && apt-get install -y curl   && mkdir build   && cd build   && curl -sSLO https://github.com/caddyserver/xcaddy/releases/download/v${XCADDY_VERSION}/xcaddy_${XCADDY_VERSION}_linux_amd64.tar.gz   && curl -sSLO https://go.dev/dl/go1.${GOLANG_VERSION}.linux-amd64.tar.gz   && rm -rf /usr/local/go   && tar -C /usr/local -xzf go1.${GOLANG_VERSION}.linux-amd64.tar.gz   && export PATH=$PATH:/usr/local/go/bin   && tar xfvz xcaddy_${XCADDY_VERSION}_linux_amd64.tar.gz   && ./xcaddy build --with github.com/kirsch33/realip     --with github.com/git001/caddyv2-upload   && pwd   && mv caddy /usr/local/bin/   && cd ..   && apt-get -y autoremove   && apt-get -y autoclean   && rm -rf build /usr/local/go /var/cache/apk/* root/.cache root/go/   && /usr/local/bin/caddy list-modules": error while running runtime: exit status 1
ERRO[0043] exit status 1                                
git001 commented 1 year ago

Okay after the "cache", which ever cache it was, have the current commit was the build successfully .

2023/02/21 10:43:56 [INFO] Build complete: ./caddy

That's the full build output.

time="2023-02-21T11:42:33+01:00" level=warning msg="Failed to decode the keys [\"machine\"] from \"/usr/share/containers/containers.conf\"."
time="2023-02-21T11:42:33+01:00" level=warning msg="Failed to decode the keys [\"machine\"] from \"/usr/share/containers/containers.conf\"."
STEP 1/6: FROM ubuntu:latest
STEP 2/6: ENV XCADDY_VERSION=0.3.2     GOLANG_VERSION=20.1     APPPORT=:2011     UPLOADER_VERSION=0.9
STEP 3/6: COPY docker-files /
STEP 4/6: RUN set -x   && apt-get -y update   && apt-get install -y curl   && mkdir build   && cd build   && curl -sSLO https://github.com/caddyserver/xcaddy/releases/download/v${XCADDY_VERSION}/xcaddy_${XCADDY_VERSION}_linux_amd64.tar.gz   && curl -sSLO https://go.dev/dl/go1.${GOLANG_VERSION}.linux-amd64.tar.gz   && rm -rf /usr/local/go   && tar -C /usr/local -xzf go1.${GOLANG_VERSION}.linux-amd64.tar.gz   && export PATH=$PATH:/usr/local/go/bin   && tar xfvz xcaddy_${XCADDY_VERSION}_linux_amd64.tar.gz   && ./xcaddy build --with github.com/kirsch33/realip     --with github.com/git001/caddyv2-upload   && pwd   && mv caddy /usr/local/bin/   && cd ..   && apt-get -y autoremove   && apt-get -y autoclean   && rm -rf build /usr/local/go /var/cache/apk/* root/.cache root/go/   && /usr/local/bin/caddy list-modules
time="2023-02-21T11:42:35+01:00" level=warning msg="Failed to decode the keys [\"machine\"] from \"/usr/share/containers/containers.conf\"."
+ apt-get -y update
Get:1 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Get:2 http://archive.ubuntu.com/ubuntu jammy InRelease [270 kB]
Get:3 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [860 kB]
Get:4 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 Packages [5557 B]
Get:5 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages [752 kB]
Get:6 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [807 kB]
Get:7 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB]
Get:8 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [107 kB]
Get:9 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages [17.5 MB]
Get:10 http://archive.ubuntu.com/ubuntu jammy/restricted amd64 Packages [164 kB]
Get:11 http://archive.ubuntu.com/ubuntu jammy/multiverse amd64 Packages [266 kB]
Get:12 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages [1792 kB]
Get:13 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 Packages [10.9 kB]
Get:14 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [1091 kB]
Get:15 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [808 kB]
Get:16 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [1136 kB]
Get:17 http://archive.ubuntu.com/ubuntu jammy-backports/main amd64 Packages [49.0 kB]
Get:18 http://archive.ubuntu.com/ubuntu jammy-backports/universe amd64 Packages [22.4 kB]
Fetched 25.8 MB in 4s (6973 kB/s)
Reading package lists...
+ apt-get install -y curl
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  ca-certificates libbrotli1 libcurl4 libldap-2.5-0 libldap-common
  libnghttp2-14 libpsl5 librtmp1 libsasl2-2 libsasl2-modules
  libsasl2-modules-db libssh-4 openssl publicsuffix
Suggested packages:
  libsasl2-modules-gssapi-mit | libsasl2-modules-gssapi-heimdal
  libsasl2-modules-ldap libsasl2-modules-otp libsasl2-modules-sql
The following NEW packages will be installed:
  ca-certificates curl libbrotli1 libcurl4 libldap-2.5-0 libldap-common
  libnghttp2-14 libpsl5 librtmp1 libsasl2-2 libsasl2-modules
  libsasl2-modules-db libssh-4 openssl publicsuffix
0 upgraded, 15 newly installed, 0 to remove and 6 not upgraded.
Need to get 2964 kB of archives.
After this operation, 7048 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 openssl amd64 3.0.2-0ubuntu1.8 [1184 kB]
Get:2 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 ca-certificates all 20211016ubuntu0.22.04.1 [144 kB]
Get:3 http://archive.ubuntu.com/ubuntu jammy/main amd64 libnghttp2-14 amd64 1.43.0-1build3 [76.3 kB]
Get:4 http://archive.ubuntu.com/ubuntu jammy/main amd64 libpsl5 amd64 0.21.0-1.2build2 [58.4 kB]
Get:5 http://archive.ubuntu.com/ubuntu jammy/main amd64 publicsuffix all 20211207.1025-1 [129 kB]
Get:6 http://archive.ubuntu.com/ubuntu jammy/main amd64 libbrotli1 amd64 1.0.9-2build6 [315 kB]
Get:7 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libsasl2-modules-db amd64 2.1.27+dfsg2-3ubuntu1.1 [20.6 kB]
Get:8 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libsasl2-2 amd64 2.1.27+dfsg2-3ubuntu1.1 [53.8 kB]
Get:9 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libldap-2.5-0 amd64 2.5.13+dfsg-0ubuntu0.22.04.1 [183 kB]
Get:10 http://archive.ubuntu.com/ubuntu jammy/main amd64 librtmp1 amd64 2.4+20151223.gitfa8646d.1-2build4 [58.2 kB]
Get:11 http://archive.ubuntu.com/ubuntu jammy/main amd64 libssh-4 amd64 0.9.6-2build1 [184 kB]
Get:12 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libcurl4 amd64 7.81.0-1ubuntu1.7 [289 kB]
Get:13 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 curl amd64 7.81.0-1ubuntu1.7 [193 kB]
Get:14 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libldap-common all 2.5.13+dfsg-0ubuntu0.22.04.1 [15.9 kB]
Get:15 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libsasl2-modules amd64 2.1.27+dfsg2-3ubuntu1.1 [57.2 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 2964 kB in 2s (1395 kB/s)
Selecting previously unselected package openssl.
(Reading database ... 4395 files and directories currently installed.)
Preparing to unpack .../00-openssl_3.0.2-0ubuntu1.8_amd64.deb ...
Unpacking openssl (3.0.2-0ubuntu1.8) ...
Selecting previously unselected package ca-certificates.
Preparing to unpack .../01-ca-certificates_20211016ubuntu0.22.04.1_all.deb ...
Unpacking ca-certificates (20211016ubuntu0.22.04.1) ...
Selecting previously unselected package libnghttp2-14:amd64.
Preparing to unpack .../02-libnghttp2-14_1.43.0-1build3_amd64.deb ...
Unpacking libnghttp2-14:amd64 (1.43.0-1build3) ...
Selecting previously unselected package libpsl5:amd64.
Preparing to unpack .../03-libpsl5_0.21.0-1.2build2_amd64.deb ...
Unpacking libpsl5:amd64 (0.21.0-1.2build2) ...
Selecting previously unselected package publicsuffix.
Preparing to unpack .../04-publicsuffix_20211207.1025-1_all.deb ...
Unpacking publicsuffix (20211207.1025-1) ...
Selecting previously unselected package libbrotli1:amd64.
Preparing to unpack .../05-libbrotli1_1.0.9-2build6_amd64.deb ...
Unpacking libbrotli1:amd64 (1.0.9-2build6) ...
Selecting previously unselected package libsasl2-modules-db:amd64.
Preparing to unpack .../06-libsasl2-modules-db_2.1.27+dfsg2-3ubuntu1.1_amd64.deb ...
Unpacking libsasl2-modules-db:amd64 (2.1.27+dfsg2-3ubuntu1.1) ...
Selecting previously unselected package libsasl2-2:amd64.
Preparing to unpack .../07-libsasl2-2_2.1.27+dfsg2-3ubuntu1.1_amd64.deb ...
Unpacking libsasl2-2:amd64 (2.1.27+dfsg2-3ubuntu1.1) ...
Selecting previously unselected package libldap-2.5-0:amd64.
Preparing to unpack .../08-libldap-2.5-0_2.5.13+dfsg-0ubuntu0.22.04.1_amd64.deb ...
Unpacking libldap-2.5-0:amd64 (2.5.13+dfsg-0ubuntu0.22.04.1) ...
Selecting previously unselected package librtmp1:amd64.
Preparing to unpack .../09-librtmp1_2.4+20151223.gitfa8646d.1-2build4_amd64.deb ...
Unpacking librtmp1:amd64 (2.4+20151223.gitfa8646d.1-2build4) ...
Selecting previously unselected package libssh-4:amd64.
Preparing to unpack .../10-libssh-4_0.9.6-2build1_amd64.deb ...
Unpacking libssh-4:amd64 (0.9.6-2build1) ...
Selecting previously unselected package libcurl4:amd64.
Preparing to unpack .../11-libcurl4_7.81.0-1ubuntu1.7_amd64.deb ...
Unpacking libcurl4:amd64 (7.81.0-1ubuntu1.7) ...
Selecting previously unselected package curl.
Preparing to unpack .../12-curl_7.81.0-1ubuntu1.7_amd64.deb ...
Unpacking curl (7.81.0-1ubuntu1.7) ...
Selecting previously unselected package libldap-common.
Preparing to unpack .../13-libldap-common_2.5.13+dfsg-0ubuntu0.22.04.1_all.deb ...
Unpacking libldap-common (2.5.13+dfsg-0ubuntu0.22.04.1) ...
Selecting previously unselected package libsasl2-modules:amd64.
Preparing to unpack .../14-libsasl2-modules_2.1.27+dfsg2-3ubuntu1.1_amd64.deb ...
Unpacking libsasl2-modules:amd64 (2.1.27+dfsg2-3ubuntu1.1) ...
Setting up libpsl5:amd64 (0.21.0-1.2build2) ...
Setting up libbrotli1:amd64 (1.0.9-2build6) ...
Setting up libsasl2-modules:amd64 (2.1.27+dfsg2-3ubuntu1.1) ...
Setting up libnghttp2-14:amd64 (1.43.0-1build3) ...
Setting up libldap-common (2.5.13+dfsg-0ubuntu0.22.04.1) ...
Setting up libsasl2-modules-db:amd64 (2.1.27+dfsg2-3ubuntu1.1) ...
Setting up librtmp1:amd64 (2.4+20151223.gitfa8646d.1-2build4) ...
Setting up libsasl2-2:amd64 (2.1.27+dfsg2-3ubuntu1.1) ...
Setting up libssh-4:amd64 (0.9.6-2build1) ...
Setting up openssl (3.0.2-0ubuntu1.8) ...
Setting up publicsuffix (20211207.1025-1) ...
Setting up libldap-2.5-0:amd64 (2.5.13+dfsg-0ubuntu0.22.04.1) ...
Setting up ca-certificates (20211016ubuntu0.22.04.1) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.34.0 /usr/local/share/perl/5.34.0 /usr/lib/x86_64-linux-gnu/perl5/5.34 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.34 /usr/share/perl/5.34 /usr/local/lib/site_perl) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
Updating certificates in /etc/ssl/certs...
124 added, 0 removed; done.
Setting up libcurl4:amd64 (7.81.0-1ubuntu1.7) ...
Setting up curl (7.81.0-1ubuntu1.7) ...
Processing triggers for libc-bin (2.35-0ubuntu3.1) ...
Processing triggers for ca-certificates (20211016ubuntu0.22.04.1) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
+ mkdir build
+ cd build
+ curl -sSLO https://github.com/caddyserver/xcaddy/releases/download/v0.3.2/xcaddy_0.3.2_linux_amd64.tar.gz
+ curl -sSLO https://go.dev/dl/go1.20.1.linux-amd64.tar.gz
+ rm -rf /usr/local/go
+ tar -C /usr/local -xzf go1.20.1.linux-amd64.tar.gz
+ export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin
+ tar xfvz xcaddy_0.3.2_linux_amd64.tar.gz
LICENSE
README.md
xcaddy
+ ./xcaddy build --with github.com/kirsch33/realip --with github.com/git001/caddyv2-upload
2023/02/21 10:42:52 [INFO] Temporary folder: /tmp/buildenv_2023-02-21-1042.6255190
2023/02/21 10:42:52 [INFO] Writing main module: /tmp/buildenv_2023-02-21-1042.6255190/main.go
package main

import (
    caddycmd "github.com/caddyserver/caddy/v2/cmd"

    // plug in Caddy modules here
    _ "github.com/caddyserver/caddy/v2/modules/standard"
    _ "github.com/kirsch33/realip"
    _ "github.com/git001/caddyv2-upload"
)

func main() {
    caddycmd.Main()
}
2023/02/21 10:42:52 [INFO] Initializing Go module
2023/02/21 10:42:52 [INFO] exec (timeout=10s): /usr/local/go/bin/go mod init caddy 
go: creating new go.mod: module caddy
go: to add module requirements and sums:
    go mod tidy
2023/02/21 10:42:52 [INFO] Pinning versions
2023/02/21 10:42:52 [INFO] exec (timeout=0s): /usr/local/go/bin/go get -d -v github.com/caddyserver/caddy/v2 
go: downloading github.com/caddyserver/caddy v1.0.5
go: downloading github.com/caddyserver/caddy/v2 v2.6.4
go: downloading github.com/google/uuid v1.3.0
go: downloading github.com/caddyserver/certmagic v0.17.2
go: downloading github.com/prometheus/client_golang v1.14.0
go: downloading github.com/quic-go/quic-go v0.32.0
go: downloading go.uber.org/zap v1.24.0
go: downloading golang.org/x/sys v0.5.0
go: downloading golang.org/x/term v0.5.0
go: downloading github.com/klauspost/cpuid/v2 v2.2.3
go: downloading github.com/libdns/libdns v0.2.1
go: downloading github.com/mholt/acmez v1.1.0
go: downloading github.com/miekg/dns v1.1.50
go: downloading golang.org/x/crypto v0.5.0
go: downloading golang.org/x/net v0.7.0
go: downloading go.uber.org/atomic v1.9.0
go: downloading go.uber.org/multierr v1.6.0
go: downloading github.com/beorn7/perks v1.0.1
go: downloading github.com/cespare/xxhash/v2 v2.1.2
go: downloading github.com/golang/protobuf v1.5.2
go: downloading github.com/prometheus/client_model v0.3.0
go: downloading github.com/prometheus/common v0.37.0
go: downloading github.com/cespare/xxhash v1.1.0
go: downloading github.com/prometheus/procfs v0.8.0
go: downloading google.golang.org/protobuf v1.28.1
go: downloading github.com/quic-go/qpack v0.4.0
go: downloading github.com/golang/mock v1.6.0
go: downloading github.com/onsi/ginkgo/v2 v2.2.0
go: downloading golang.org/x/tools v0.2.0
go: downloading github.com/matttproud/golang_protobuf_extensions v1.0.1
go: downloading github.com/quic-go/qtls-go1-18 v0.2.0
go: downloading github.com/quic-go/qtls-go1-19 v0.2.0
go: downloading github.com/quic-go/qtls-go1-20 v0.1.0
go: downloading golang.org/x/exp v0.0.0-20221205204356-47842c84f3db
go: downloading golang.org/x/text v0.7.0
go: downloading golang.org/x/mod v0.6.0
go: downloading github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0
go: downloading github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38
go: added github.com/beorn7/perks v1.0.1
go: added github.com/caddyserver/caddy/v2 v2.6.4
go: added github.com/caddyserver/certmagic v0.17.2
go: added github.com/cespare/xxhash/v2 v2.1.2
go: added github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0
go: added github.com/golang/mock v1.6.0
go: added github.com/golang/protobuf v1.5.2
go: added github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38
go: added github.com/google/uuid v1.3.0
go: added github.com/klauspost/cpuid/v2 v2.2.3
go: added github.com/libdns/libdns v0.2.1
go: added github.com/matttproud/golang_protobuf_extensions v1.0.1
go: added github.com/mholt/acmez v1.1.0
go: added github.com/miekg/dns v1.1.50
go: added github.com/onsi/ginkgo/v2 v2.2.0
go: added github.com/prometheus/client_golang v1.14.0
go: added github.com/prometheus/client_model v0.3.0
go: added github.com/prometheus/common v0.37.0
go: added github.com/prometheus/procfs v0.8.0
go: added github.com/quic-go/qpack v0.4.0
go: added github.com/quic-go/qtls-go1-18 v0.2.0
go: added github.com/quic-go/qtls-go1-19 v0.2.0
go: added github.com/quic-go/qtls-go1-20 v0.1.0
go: added github.com/quic-go/quic-go v0.32.0
go: added go.uber.org/atomic v1.9.0
go: added go.uber.org/multierr v1.6.0
go: added go.uber.org/zap v1.24.0
go: added golang.org/x/crypto v0.5.0
go: added golang.org/x/exp v0.0.0-20221205204356-47842c84f3db
go: added golang.org/x/mod v0.6.0
go: added golang.org/x/net v0.7.0
go: added golang.org/x/sys v0.5.0
go: added golang.org/x/term v0.5.0
go: added golang.org/x/text v0.7.0
go: added golang.org/x/tools v0.2.0
go: added google.golang.org/protobuf v1.28.1
2023/02/21 10:43:01 [INFO] exec (timeout=0s): /usr/local/go/bin/go get -d -v github.com/kirsch33/realip github.com/caddyserver/caddy/v2 
go: downloading github.com/kirsch33/realip v1.6.1
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading github.com/google/cel-go v0.13.0
go: downloading google.golang.org/genproto v0.0.0-20230202175211-008b39050e57
go: downloading github.com/smallstep/certificates v0.23.2
go: downloading github.com/smallstep/truststore v0.12.1
go: downloading go.step.sm/crypto v0.23.2
go: downloading github.com/tailscale/tscert v0.0.0-20230124224810-c6dc1f4049b2
go: downloading github.com/aryann/difflib v0.0.0-20210328193216-ff5ff6dc229b
go: downloading github.com/spf13/cobra v1.6.1
go: downloading github.com/spf13/pflag v1.0.5
go: downloading github.com/antlr/antlr4/runtime/Go/antlr v1.4.10
go: downloading github.com/stoewer/go-strcase v1.2.0
go: downloading howett.net/plist v1.0.0
go: downloading github.com/pkg/errors v0.9.1
go: downloading github.com/smallstep/nosql v0.5.0
go: downloading go.step.sm/cli-utils v0.7.5
go: downloading go.step.sm/linkedca v0.19.0
go: downloading google.golang.org/grpc v1.52.3
go: downloading github.com/antlr/antlr4 v0.0.0-20200503195918-621b933c7a7f
go: downloading gopkg.in/square/go-jose.v2 v2.6.0
go: downloading github.com/slackhq/nebula v1.6.1
go: downloading github.com/Microsoft/go-winio v0.6.0
go: downloading github.com/mitchellh/go-ps v1.0.0
go: downloading filippo.io/edwards25519 v1.0.0
go: downloading github.com/Masterminds/sprig/v3 v3.2.3
go: downloading github.com/micromdm/scep/v2 v2.1.0
go: downloading go.mozilla.org/pkcs7 v0.0.0-20210826202110-33d05740a352
go: downloading github.com/inconshreveable/mousetrap v1.0.1
go: downloading github.com/cpuguy83/go-md2man/v2 v2.0.2
go: downloading gopkg.in/yaml.v3 v3.0.1
go: downloading github.com/urfave/cli v1.22.12
go: downloading github.com/Masterminds/sprig v2.22.0+incompatible
go: downloading github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e
go: downloading github.com/manifoldco/promptui v0.9.0
go: downloading github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22
go: downloading github.com/cpuguy83/go-md2man v1.0.10
go: downloading github.com/go-kit/kit v0.10.0
go: downloading github.com/dgraph-io/badger v1.6.2
go: downloading github.com/dgraph-io/badger/v2 v2.2007.4
go: downloading go.etcd.io/bbolt v1.3.6
go: downloading github.com/go-sql-driver/mysql v1.6.0
go: downloading github.com/jackc/pgx/v4 v4.17.2
go: downloading github.com/Masterminds/goutils v1.1.1
go: downloading github.com/Masterminds/semver/v3 v3.2.0
go: downloading github.com/huandu/xstrings v1.3.3
go: downloading github.com/imdario/mergo v0.3.12
go: downloading github.com/Masterminds/semver v1.5.0
go: downloading github.com/mitchellh/copystructure v1.2.0
go: downloading github.com/shopspring/decimal v1.2.0
go: downloading github.com/spf13/cast v1.4.1
go: downloading github.com/russross/blackfriday/v2 v2.1.0
go: downloading github.com/go-logfmt/logfmt v0.5.1
go: downloading github.com/dgraph-io/ristretto v0.1.0
go: downloading github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13
go: downloading github.com/jackc/pgconn v1.13.0
go: downloading github.com/russross/blackfriday v1.5.2
go: downloading github.com/jackc/pgio v1.0.0
go: downloading github.com/jackc/pgproto3/v2 v2.3.1
go: downloading github.com/jackc/pgtype v1.12.0
go: downloading github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d
go: downloading github.com/mitchellh/reflectwalk v1.0.2
go: downloading github.com/golang/snappy v0.0.4
go: downloading github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96
go: downloading github.com/klauspost/compress v1.15.15
go: downloading github.com/jackc/chunkreader/v2 v2.0.1
go: downloading github.com/jackc/pgpassfile v1.0.0
go: downloading github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b
go: downloading github.com/shurcooL/sanitized_anchor_name v1.0.0
go: downloading github.com/golang/glog v1.0.0
go: downloading github.com/mattn/go-colorable v0.1.8
go: downloading github.com/mattn/go-isatty v0.0.13
go: downloading github.com/antlr/antlr4 v4.11.1+incompatible
go: upgraded github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 => v0.0.0-20210601050228-01bbb1931b22
go: added github.com/kirsch33/realip v1.6.1
2023/02/21 10:43:14 [INFO] exec (timeout=0s): /usr/local/go/bin/go get -d -v github.com/git001/caddyv2-upload github.com/caddyserver/caddy/v2 
go: downloading github.com/git001/caddyv2-upload v0.0.0-20230221102021-abf858dc0f3b
go: added github.com/git001/caddyv2-upload v0.0.0-20230221102021-abf858dc0f3b
2023/02/21 10:43:16 [INFO] exec (timeout=0s): /usr/local/go/bin/go get -d -v  
go: downloading github.com/go-chi/chi v4.1.2+incompatible
go: downloading gopkg.in/natefinch/lumberjack.v2 v2.2.1
go: downloading golang.org/x/sync v0.1.0
go: downloading github.com/BurntSushi/toml v1.2.1
go: downloading github.com/alecthomas/chroma/v2 v2.5.0
go: downloading github.com/yuin/goldmark v1.5.4
go: downloading go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.39.0
go: downloading github.com/yuin/goldmark-highlighting/v2 v2.0.0-20220924101305-151362477c87
go: downloading go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.4.0
go: downloading go.opentelemetry.io/otel v1.13.0
go: downloading go.opentelemetry.io/otel/sdk v1.13.0
go: downloading github.com/yuin/goldmark-highlighting v0.0.0-20210516132338-9216f9c5aa01
go: downloading go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.4.0
go: downloading go.opentelemetry.io/contrib v0.20.0
go: downloading github.com/fxamacker/cbor/v2 v2.4.0
go: downloading github.com/alecthomas/chroma v0.9.2
go: downloading go.opentelemetry.io/otel/exporters/otlp v0.20.0
go: downloading github.com/rs/xid v1.4.0
go: downloading github.com/sirupsen/logrus v1.9.0
go: downloading github.com/felixge/httpsnoop v1.0.3
go: downloading go.opentelemetry.io/otel/metric v0.36.0
go: downloading go.opentelemetry.io/otel/trace v1.13.0
go: downloading github.com/x448/float16 v0.8.4
go: downloading go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.4.0
go: downloading go.opentelemetry.io/proto/otlp v0.12.0
go: downloading github.com/go-logr/logr v1.2.3
go: downloading github.com/go-logr/stdr v1.2.2
go: downloading github.com/dlclark/regexp2 v1.7.0
go: downloading github.com/cenkalti/backoff/v4 v4.1.2
go: downloading github.com/grpc-ecosystem/grpc-gateway v1.16.0
go: downloading github.com/cenkalti/backoff v2.2.1+incompatible
2023/02/21 10:43:19 [INFO] Build environment ready
2023/02/21 10:43:19 [INFO] Building Caddy
2023/02/21 10:43:19 [INFO] exec (timeout=0s): /usr/local/go/bin/go mod tidy 
go: downloading github.com/stretchr/testify v1.8.1
go: downloading go.uber.org/goleak v1.1.12
go: downloading gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c
go: downloading github.com/onsi/gomega v1.20.1
go: downloading github.com/benbjohnson/clock v1.1.0
go: downloading github.com/davecgh/go-spew v1.1.1
go: downloading github.com/smallstep/assert v0.0.0-20200723003110-82e2b9b3b262
go: downloading github.com/google/go-cmp v0.5.9
go: downloading github.com/alecthomas/assert/v2 v2.2.1
go: downloading github.com/pmezard/go-difflib v1.0.0
go: downloading gopkg.in/yaml.v2 v2.4.0
go: downloading github.com/alecthomas/repr v0.2.0
go: downloading github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1
go: downloading github.com/aws/aws-sdk-go v1.44.185
go: downloading cloud.google.com/go/kms v1.8.0
go: downloading cloud.google.com/go v0.107.0
go: downloading github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38
go: downloading github.com/googleapis/gax-go/v2 v2.7.0
go: downloading google.golang.org/api v0.108.0
go: downloading github.com/cockroachdb/apd v1.1.0
go: downloading github.com/gofrs/uuid v4.0.0+incompatible
go: downloading github.com/googleapis/gax-go v2.0.2+incompatible
go: downloading github.com/go-stack/stack v1.8.0
go: downloading github.com/chzyer/logex v1.1.10
go: downloading github.com/kr/pretty v0.3.1
go: downloading github.com/hexops/gotextdiff v1.0.3
go: downloading cloud.google.com/go/iam v0.8.0
go: downloading github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65
go: downloading github.com/lib/pq v1.10.2
go: downloading github.com/kr/text v0.2.0
go: downloading github.com/rogpeppe/go-internal v1.9.0
go: downloading github.com/OneOfOne/xxhash v1.2.2
go: downloading github.com/spaolacci/murmur3 v1.1.0
go: downloading github.com/jmespath/go-jmespath v0.4.0
go: downloading golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783
go: downloading google.golang.org/appengine v1.6.7
go: downloading go.opencensus.io v0.24.0
go: downloading cloud.google.com/go/compute/metadata v0.2.3
go: downloading cloud.google.com/go/compute v1.14.0
go: downloading github.com/googleapis/enterprise-certificate-proxy v0.2.1
go: downloading github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da
2023/02/21 10:43:26 [INFO] exec (timeout=0s): /usr/local/go/bin/go build -o /build/caddy -ldflags -w -s -trimpath 
2023/02/21 10:43:56 [INFO] Build complete: ./caddy
2023/02/21 10:43:56 [INFO] Cleaning up temporary folder: /tmp/buildenv_2023-02-21-1042.6255190
+ pwd
/build
+ mv caddy /usr/local/bin/
+ cd ..
+ apt-get -y autoremove
Reading package lists...
Building dependency tree...
Reading state information...
0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
+ apt-get -y autoclean
Reading package lists...
Building dependency tree...
Reading state information...
+ rm -rf build /usr/local/go /var/cache/apk/* root/.cache root/go/
+ /usr/local/bin/caddy list-modules
admin.api.load
admin.api.metrics
admin.api.pki
admin.api.reverse_proxy
caddy.adapters.caddyfile
caddy.config_loaders.http
caddy.listeners.http_redirect
caddy.listeners.tls
caddy.logging.encoders.console
caddy.logging.encoders.filter
caddy.logging.encoders.filter.cookie
caddy.logging.encoders.filter.delete
caddy.logging.encoders.filter.hash
caddy.logging.encoders.filter.ip_mask
caddy.logging.encoders.filter.query
caddy.logging.encoders.filter.regexp
caddy.logging.encoders.filter.rename
caddy.logging.encoders.filter.replace
caddy.logging.encoders.json
caddy.logging.writers.discard
caddy.logging.writers.file
caddy.logging.writers.net
caddy.logging.writers.stderr
caddy.logging.writers.stdout
caddy.storage.file_system
events
http
http.authentication.hashes.bcrypt
http.authentication.hashes.scrypt
http.authentication.providers.http_basic
http.encoders.gzip
http.encoders.zstd
http.handlers.acme_server
http.handlers.authentication
http.handlers.copy_response
http.handlers.copy_response_headers
http.handlers.encode
http.handlers.error
http.handlers.file_server
http.handlers.headers
http.handlers.map
http.handlers.metrics
http.handlers.push
http.handlers.request_body
http.handlers.reverse_proxy
http.handlers.rewrite
http.handlers.static_response
http.handlers.subroute
http.handlers.templates
http.handlers.tracing
http.handlers.vars
http.ip_sources.static
http.matchers.expression
http.matchers.file
http.matchers.header
http.matchers.header_regexp
http.matchers.host
http.matchers.method
http.matchers.not
http.matchers.path
http.matchers.path_regexp
http.matchers.protocol
http.matchers.query
http.matchers.remote_ip
http.matchers.vars
http.matchers.vars_regexp
http.precompressed.br
http.precompressed.gzip
http.precompressed.zstd
http.reverse_proxy.selection_policies.cookie
http.reverse_proxy.selection_policies.first
http.reverse_proxy.selection_policies.header
http.reverse_proxy.selection_policies.ip_hash
http.reverse_proxy.selection_policies.least_conn
http.reverse_proxy.selection_policies.random
http.reverse_proxy.selection_policies.random_choose
http.reverse_proxy.selection_policies.round_robin
http.reverse_proxy.selection_policies.uri_hash
http.reverse_proxy.transport.fastcgi
http.reverse_proxy.transport.http
http.reverse_proxy.upstreams.a
http.reverse_proxy.upstreams.multi
http.reverse_proxy.upstreams.srv
pki
tls
tls.certificates.automate
tls.certificates.load_files
tls.certificates.load_folders
tls.certificates.load_pem
tls.certificates.load_storage
tls.client_auth.leaf
tls.get_certificate.http
tls.get_certificate.tailscale
tls.handshake_match.remote_ip
tls.handshake_match.sni
tls.issuance.acme
tls.issuance.internal
tls.issuance.zerossl
tls.stek.distributed
tls.stek.standard

  Standard modules: 100

http.handlers.realip
http.handlers.upload

  Non-standard modules: 2

  Unknown modules: 0
STEP 5/6: WORKDIR /opt/webroot/
STEP 6/6: CMD ["/usr/local/bin/caddy","run","-config","config/Caddyfile-upload.json"]
COMMIT caddyv2-upload
Getting image source signatures
Copying blob sha256:c5ff2d88f67954bdcf1cfdd46fe3d683858d69c2cadd6660812edfc83726c654
Copying blob sha256:0328bfb749f87577ccf2013f405d5249f03e6a90756474ae3f293463bf3b9132
Copying config sha256:b86646802475aac328944aa6324ccb2d7305d1b1ea0f6097b3a8ab15a99c21c2
Writing manifest to image destination
Storing signatures
--> b8664680247
Successfully tagged docker.io/me2digital/caddyv2-upload:0.8
Successfully tagged orcladev2.azurecr.io/caddyv2-upload:latest
b86646802475aac328944aa6324ccb2d7305d1b1ea0f6097b3a8ab15a99c21c2
etherwvlf commented 1 year ago

Yes ! All fine now... Thank you kindly.

gedw99 commented 1 year ago

it works for me too !! thankyou