We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Dockerfile
1 parent 712c5d4 commit 8a85698Copy full SHA for 8a85698
3 files changed
.dockerignore
@@ -0,0 +1,3 @@
1
+node_modules
2
+dist
3
+bin
Dockerfile
@@ -0,0 +1,7 @@
+FROM golang:alpine
+WORKDIR /app
+COPY . /app
4
+EXPOSE 53273
5
+RUN apk add --no-cache make
6
+RUN make linux
7
+ENTRYPOINT ["./bin/server_linux"]
Makefile
@@ -1,5 +1,6 @@
SRC := cmd/server/main.go
TEMPL := github.com/a-h/templ/cmd/templ@latest
+ARGS := $(filter-out $@,$(MAKECMDGOALS))
win32:
@GOOS=windows go build -o bin/server_$@.exe $(SRC)
linux:
@@ -16,6 +17,8 @@ format:
16
17
@go fmt ./...
18
run:
19
@go run $(SRC) $(filter-out $@,$(MAKECMDGOALS))
20
+docker:
21
+ @docker build . -t server
22
all: win32 linux darwin
23
%:
24
@:
0 commit comments