Question description
When I run fiber with prefork: false inside docker, all works fine. prefork: true causes the container to panic out.
Code snippetOptional
package main
import"github.com/gofiber/fiber/v2"funcmain() {
app:=fiber.New(fiber.Config{
Prefork: true,
})
gofunc() {
iferr:=app.Listen(fmt.Sprintf(":%d", viper.GetInt("server.port"))); err!=nil {
log.Panic(err)
}
}()
c:=make(chan os.Signal, 1) // Create channel to signify a signal being sentsignal.Notify(c, os.Interrupt) // When an interrupt is sent, notify the channel_=<-c// This blocks the main thread until an interrupt is receivedfmt.Println("Gracefully shutting down...")
_=app.Shutdown()
}
Thanks for opening your first issue here! 🎉 Be sure to follow the issue template! If you need help or want to chat with us, join us on Discord https://gofiber.io/discord
Unlike the shell form, the exec form (CMD [...]) does not invoke a command shell. This means that normal shell processing does not happen. For example, CMD [ "echo", "$HOME" ] will not do variable substitution on $HOME. If you want shell processing then either use the shell form (CMD ./app) or execute a shell directly, for example: CMD [ "sh", "-c", "echo $HOME" ]. When using the exec form and executing a shell directly, as in the case for the shell form, it is the shell that is doing the environment variable expansion, not docker.
So execute your app with either CMD ./app or CMD ["sh", "-c", "/app"]. Let me know if this works.
Question description
When I run fiber with
prefork: false
inside docker, all works fine.prefork: true
causes the container to panic out.Code snippet Optional
**Output
The text was updated successfully, but these errors were encountered: