Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker-Compose Build Failure #248

Open
firedrow opened this issue Mar 30, 2020 · 12 comments
Open

Docker-Compose Build Failure #248

firedrow opened this issue Mar 30, 2020 · 12 comments

Comments

@firedrow
Copy link

This may be related to Issue #247 but I wanted to post based on how I am setup.

I'm using Docker-Compose to attempt to build caddy and it keeps failing. I have the same configuration running on a different system, but I haven't rebuilt in a while so it worked back when I originally got it setup.

version: '3.4'
services:
  caddy:
    build:
      context: github.com/abiosoft/caddy-docker.git
      args:
        plugins: cgi,cors,webdav
    container_name: "caddy"
    environment:
      - ACME_AGREE=true
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - /mnt/data/disk2/caddy/Caddyfile:/etc/Caddyfile:ro
      - /mnt/data/disk2/caddy/www:/var/www:rw
      - /mnt/data/disk2/caddy/cert:/root/.caddy:rw
      - /mnt/data/disk2/caddy/logs:/root/logs:rw
    restart: always

When I run my docker-compose up -d I get through most of the stages until it goes to build caddy.

starting stage: building caddy
go: downloading gopkg.in/natefinch/lumberjack.v2 v2.0.0
go: downloading github.com/hashicorp/go-syslog v1.0.0
go: downloading github.com/jimstudt/http-authentication v0.0.0-20140401203705-3eca13d6893a
go: downloading gopkg.in/yaml.v2 v2.2.2
go: downloading github.com/gorilla/websocket v1.4.0
go: downloading github.com/dustin/go-humanize v1.0.0
go: downloading github.com/russross/blackfriday v0.0.0-20170610170232-067529f716f4
go: downloading github.com/naoina/toml v0.1.1
go: downloading github.com/lucas-clemente/quic-go v0.10.2
go: extracting github.com/jimstudt/http-authentication v0.0.0-20140401203705-3eca13d6893a
go: extracting github.com/hashicorp/go-syslog v1.0.0
go: extracting github.com/russross/blackfriday v0.0.0-20170610170232-067529f716f4
go: extracting gopkg.in/yaml.v2 v2.2.2
go: extracting github.com/naoina/toml v0.1.1
go: extracting gopkg.in/natefinch/lumberjack.v2 v2.0.0
go: extracting github.com/gorilla/websocket v1.4.0
go: downloading github.com/naoina/go-stringutil v0.1.0
go: extracting github.com/dustin/go-humanize v1.0.0
go: extracting github.com/lucas-clemente/quic-go v0.10.2
go: extracting github.com/naoina/go-stringutil v0.1.0
go: downloading github.com/bifurcation/mint v0.0.0-20180715133206-93c51c6ce115
go: downloading github.com/cheekybits/genny v0.0.0-20170328200008-9127e812e1e9
go: downloading github.com/lucas-clemente/aes12 v0.0.0-20171027163421-cd47fb39b79f
go: downloading github.com/hashicorp/golang-lru v0.0.0-20180201235237-0fb14efe8c47
go: downloading github.com/lucas-clemente/quic-go-certificates v0.0.0-20160823095156-d2f86524cced
go: extracting github.com/cheekybits/genny v0.0.0-20170328200008-9127e812e1e9
go: extracting github.com/hashicorp/golang-lru v0.0.0-20180201235237-0fb14efe8c47
go: extracting github.com/lucas-clemente/quic-go-certificates v0.0.0-20160823095156-d2f86524cced
go: extracting github.com/lucas-clemente/aes12 v0.0.0-20171027163421-cd47fb39b79f
go: extracting github.com/bifurcation/mint v0.0.0-20180715133206-93c51c6ce115
can't load package: package caddy: 
cgi.go:2:10: invalid import path: ""
error at 'building caddy'
ERROR: Service 'caddy' failed to build: The command '/bin/sh -c VERSION=${version} PLUGINS=${plugins} ENABLE_TELEMETRY=${enable_telemetry} /bin/sh /usr/bin/builder.sh' returned a non-zero code: 1

@MexHigh
Copy link

MexHigh commented Apr 1, 2020

Same problem here with plugins: cors,realip,expires,cache,ipfilter,jwt,login

@Yun-Mao
Copy link

Yun-Mao commented Apr 7, 2020

I try to fix it by an unfriendly but useful way. If you need you can try to use mine.
caddy_docker

@lindelleric
Copy link

I try to fix it by an unfriendly but useful way. If you need you can try to use mine.
caddy_docker

What seems to be the issue?

@Yun-Mao
Copy link

Yun-Mao commented Apr 7, 2020

I try to fix it by an unfriendly but useful way. If you need you can try to use mine.
caddy_docker

What seems to be the issue?

I think maybe there are something wrong when getting the link of plugins' packages. I just import the packages manually, so I'm sorry that I don't know the real issue in it.

@tdorsey
Copy link

tdorsey commented Apr 8, 2020

There's more dicussion on this in #223, if it helps anyone. At least part of the issue is the plugins need their full gopath specified at the moment, ie go/github/foo/bar/login instead of login when specifying the plugin argument

@happiness9721
Copy link

I try to fix it by an unfriendly but useful way. If you need you can try to use mine.
caddy_docker

thank you guy, u save my day!

@talan-z
Copy link

talan-z commented Apr 25, 2020

Hi everyone,
I'm also experiencing this issue when I try to build with route53 plugin (while adding realip). It fails to find the import path for realip.
An thoughts? #223 did not help me...

@Yun-Mao
Copy link

Yun-Mao commented Apr 25, 2020

Hi everyone,
I'm also experiencing this issue when I try to build with route53 plugin (while adding realip). It fails to find the import path for realip.
An thoughts? #223 did not help me...

you could try to use caddy_docker

@talan-z
Copy link

talan-z commented Apr 25, 2020

Thanks, Yu Mao. That's a good workaround. I just managed it to get it to work.
But it's only a workaround.
I see these issues popping up for several months. Shouldn't this be fixed by now?

@Yun-Mao
Copy link

Yun-Mao commented Apr 25, 2020

Thanks, Yu Mao. That's a good workaround. I just managed it to get it to work.
But it's only a workaround.
I see these issues popping up for several months. Shouldn't this be fixed by now?

yeah,I hope the problem can be solved, too

@test0103
Copy link

test0103 commented May 2, 2020

I have a same problem, but I can't fix it .

@Inlustra
Copy link

Also ran into the same problem, I've tried using @Yun-Mao's fork and #223 but neither have worked for me.
Unfortunately haven't had the time to dig further into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants