Add Dockerfile

The Go version had to be dropped since 1.24 is too new to have hit the repos yet.
This commit is contained in:
akp 2025-02-15 14:17:45 +00:00
parent df2bbf58fc
commit 32863b1ad1
No known key found for this signature in database
GPG key ID: CF8D58F3DEB20755
2 changed files with 13 additions and 1 deletions

12
Dockerfile Normal file
View file

@ -0,0 +1,12 @@
FROM golang:1 as builder
RUN mkdir /build
ADD . /build/
WORKDIR /build
RUN CGO_ENABLED=0 GOOS=linux go build -a -buildvcs=false -installsuffix cgo -ldflags '-extldflags "-static" -s -w' -o main git.tdpain.net/codemicro/now-playing/nowplaying
FROM alpine
COPY --from=builder /build/main /
WORKDIR /run
CMD ["../main"]

2
go.mod
View file

@ -1,6 +1,6 @@
module git.tdpain.net/codemicro/now-playing
go 1.24.0
go 1.23
require (
crawshaw.dev/jsonfile v0.0.0-20240206193014-699d1dad804e