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:
parent
df2bbf58fc
commit
32863b1ad1
2 changed files with 13 additions and 1 deletions
12
Dockerfile
Normal file
12
Dockerfile
Normal 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
2
go.mod
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue