question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Caddy does not build

See original GitHub issue

API Platform version(s) affected: 2.6.8

Description
Caddy does not build

2022/06/07 08:14:29 [FATAL] exit status 2
[568] Service 'caddy' failed to build : The command '/bin/sh -c xcaddy build     --with github.com/dunglas/mercure     --with github.com/dunglas/mercure/caddy     --with github.com/dunglas/vulcain     --with github.com/dunglas/vulcain/caddy' returned a non-zero code: 1

[569]
Cleaning up project directory and file based variables
00:01
[570] ERROR: Job failed: exit status 1

How to reproduce
Build API platform

Additional Context
Gitlab CI/CD

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
KojoEnchcommented, Sep 21, 2022

Same today with a fresh clone, while building with --no-cache. Updating caddy version as suggested by @icfmp did the trick:

diff --git a/api/Dockerfile b/api/Dockerfile
index 49452a7..4b8cc49 100644
--- a/api/Dockerfile
+++ b/api/Dockerfile
@@ -121,7 +121,7 @@ RUN set -eux; \
 RUN rm -f .env.local.php
 
 # Build Caddy with the Mercure and Vulcain modules
-FROM caddy:2-builder-alpine AS app_caddy_builder
+FROM caddy:2.5.2-builder-alpine AS app_caddy_builder
 
 RUN xcaddy build \
        --with github.com/dunglas/mercure \
@@ -130,7 +130,7 @@ RUN xcaddy build \
        --with github.com/dunglas/vulcain/caddy
 
 # Caddy image
-FROM caddy:2-alpine AS app_caddy
+FROM caddy:2.5.2-alpine AS app_caddy
 
 WORKDIR /srv/app
1reaction
icfmpcommented, Sep 7, 2022

Same today but with mercure instead

Capture d’écran du 2022-09-07 09-32-25

I had to change CADDY_VERSION to 2.5.2 in place of 2.5.1. CADDY_VERSION=2 didn’t work for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Build from source — Caddy Documentation
The xcaddy command is the easiest way to build Caddy with version information and/or plugins. Requirements: ... You do not need to download...
Read more >
Trying to build caddy from source to test 2.5.0-beta with plugins
xcaddy build. This part fails for me, I'm assuming I can NOT use go 1.18 here and should fall back to go 1.16...
Read more >
Building Caddy Server From Source - Calhoun.io
Caddy's licensing change makes it problematic for many bootstrapped projects. Learn to build Caddy from source which is still open source with no...
Read more >
arm64v8/caddy - Docker Image
Building your own Caddy-based image. Most users deploying production sites will not want to rely on mounting files into a container, but will...
Read more >
Unable to build Caddy with custom modules - NixOS Discourse
installing install: cannot stat '/nix/store/krcc44294g624jah0vf778czc4j3dxk5-source/init/caddy.service': No such file or directory install: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found