Skip to content

Commit

Permalink
Hello world dockerfile.
Browse files Browse the repository at this point in the history
  • Loading branch information
craigjbass committed Nov 10, 2022
1 parent e8a002a commit 2db6e97
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM golang AS builder
WORKDIR /go/src/sparkling-dependencies
ADD . ./
RUN CGO_ENABLED=0 go build -ldflags '-extldflags "-static"' -o ./compiled github.com/madetech/sparkling-dependencies/cmd/action

FROM scratch
COPY --from=builder /go/src/sparkling-dependencies/compiled/action /action
ENTRYPOINT ["/action"]
5 changes: 5 additions & 0 deletions cmd/action/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package main

func main() {
println("Hello world")
}
Empty file added compiled/.keep
Empty file.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module sparkling-dependencies
module github.com/madetech/sparkling-dependencies

go 1.19

0 comments on commit 2db6e97

Please sign in to comment.