axiomhq / axiom-syslog-proxy

A syslog push interface to Axiom.
https://axiom.co
MIT License
8 stars 4 forks source link

Fix dockerfile #36

Closed smorimoto closed 1 year ago

smorimoto commented 1 year ago

@lukasmalkmus I'm so sorry! I just noticed that we can't run it as nonroot!

2023-08-10T13:54:16.212 app[91857559c17998] nrt [info] {"level":"info","ts":1691675656.2120683,"logger":"axiom-syslog-proxy","caller":"cmd/cmd.go:71","msg":"starting","release":"0.6.0","revision":"edef102","build_date":"2023-08-09T11:41:52Z","build_user":"goreleaser","go_version":"go1.20.7"}

2023-08-10T13:54:16.212 app[91857559c17998] nrt [info] {"level":"info","ts":1691675656.2124286,"logger":"axiom-syslog-proxy","caller":"cmd/cmd.go:106","msg":"started"}

2023-08-10T13:54:16.212 app[91857559c17998] nrt [info] {"level":"error","ts":1691675656.2128325,"logger":"axiom-syslog-proxy","caller":"cmd/cmd.go:113","msg":"create server","error":"listen tcp :601: bind: permission denied"}

2023-08-10T13:54:16.213 app[91857559c17998] nrt [info] {"level":"warn","ts":1691675656.2129228,"logger":"axiom-syslog-proxy","caller":"cmd/cmd.go:60","msg":"stopped"}

This affects all users using latest, so I think it needs a quick release!

smorimoto commented 1 year ago

I deployed with the exact same image I fixed, and it works as expected. The last time I tested it, I overlooked this issue because I used a multistage build to run the application in a slightly different setup from this repository.

2023-08-10T13:59:45.417 app[91857559c17998] nrt [info] 2023/08/10 13:59:45 listening on [fdaa:2:1571:a7b:17c:5275:2a9c:2]:22 (DNS: [fdaa::3]:53)

2023-08-10T13:59:45.436 app[91857559c17998] nrt [info] {"level":"info","ts":1691675985.4362023,"logger":"axiom-syslog-proxy","caller":"cmd/cmd.go:71","msg":"starting","release":"0.6.0","revision":"edef102","build_date":"2023-08-09T11:41:52Z","build_user":"goreleaser","go_version":"go1.20.7"}

2023-08-10T13:59:45.436 app[91857559c17998] nrt [info] {"level":"info","ts":1691675985.4365556,"logger":"axiom-syslog-proxy","caller":"cmd/cmd.go:106","msg":"started"}

2023-08-10T13:59:45.437 app[91857559c17998] nrt [info] [13:59:45.43] info axiom-syslog-proxy@logs/input udp.go:18 Started UDP server on udp:[::]:514

2023-08-10T13:59:45.437 app[91857559c17998] nrt [info] [13:59:45.43] info axiom-syslog-proxy@logs/input tcp.go:23 Started TCP server on tcp:[::]:601

2023-08-10T14:00:46.215 app[91857559c17998] nrt [info] 2023/08/10 14:00:46 ingested 1 event(s)
lukasmalkmus commented 1 year ago

Argh, damit. But happens to the best.

We are still pre v1.0.0 so let's merge this, release v0.6.1 and call it a day :)

smorimoto commented 1 year ago

Yeah, that sounds good to me. It's good to see that the image size is now under 10MB, resource efficiency is improved, and the security holes that can be attacked are much smaller.

smorimoto commented 1 year ago

I can confirm again that it's working correctly! Thank you so much for the release!