~repos /gromer
git clone https://pyrossh.dev/repos/gromer.git
gromer is a framework and cli to build multipage web apps in golang using htmx and alpinejs.
e038cf6b
—
Peter John 3 years ago
rename dockerfile
- _example/Containerfile +14 -0
- _example/Dockerfile +0 -14
- _example/makefile +4 -9
_example/Containerfile
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
FROM golang:1.18-buster AS build
|
|
2
|
+
|
|
3
|
+
WORKDIR /app
|
|
4
|
+
COPY go.mod ./
|
|
5
|
+
COPY go.sum ./
|
|
6
|
+
RUN go mod download
|
|
7
|
+
COPY ./ ./
|
|
8
|
+
RUN cd _example && go build -o /out
|
|
9
|
+
|
|
10
|
+
FROM gcr.io/distroless/base:latest
|
|
11
|
+
|
|
12
|
+
WORKDIR /
|
|
13
|
+
COPY --from=build /out /out
|
|
14
|
+
ENTRYPOINT ["/out"]
|
_example/Dockerfile
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
FROM golang:1.16-buster AS build
|
|
2
|
-
|
|
3
|
-
WORKDIR /app
|
|
4
|
-
COPY go.mod ./
|
|
5
|
-
COPY go.sum ./
|
|
6
|
-
RUN go mod download
|
|
7
|
-
COPY ./ ./
|
|
8
|
-
RUN cd example && go build -o /example
|
|
9
|
-
|
|
10
|
-
FROM gcr.io/distroless/base-debian10
|
|
11
|
-
|
|
12
|
-
WORKDIR /
|
|
13
|
-
COPY --from=build /example /example
|
|
14
|
-
ENTRYPOINT ["/example"]
|
_example/makefile
CHANGED
|
@@ -5,16 +5,11 @@ setup:
|
|
|
5
5
|
update:
|
|
6
6
|
gromer -pkg github.com/pyros2097/gromer/_example
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
dev:
|
|
9
9
|
gow run main.go
|
|
10
10
|
|
|
11
|
-
build: export GOOS=linux
|
|
12
|
-
build: export GOARCH=amd64
|
|
13
11
|
build:
|
|
14
|
-
go build -o main
|
|
15
|
-
|
|
16
|
-
docker-build:
|
|
17
|
-
|
|
12
|
+
podman build -f ../_example/Containerfile -t example-app:develop ../
|
|
18
13
|
|
|
19
|
-
|
|
14
|
+
run:
|
|
20
|
-
|
|
15
|
+
podman run -p 3000:3000 example-app:develop
|