Skip to content

Commit d8549db

Browse files
authored
fix the dockerfile build process (#24)
Co-authored-by: rick <[email protected]>
1 parent e2340a2 commit d8549db

File tree

2 files changed

+47
-3
lines changed

2 files changed

+47
-3
lines changed

Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ FROM golang:1.17 as builder
33
WORKDIR /workspace
44
COPY . .
55
RUN go mod download
6-
RUN CGO_ENABLE=0 go build -ldflags "-w -s" -o atest cmd/*.go
7-
8-
FROM ghcr.io/linuxsuren/hd:v0.0.67 as hd
6+
RUN CGO_ENABLE=0 go build -ldflags "-w -s" -o atest .
97

108
FROM alpine:3.10
119

sample/manifest.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
apiVersion: apps/v1
3+
kind: Deployment
4+
metadata:
5+
creationTimestamp: null
6+
labels:
7+
app: api-testing
8+
name: api-testing
9+
spec:
10+
replicas: 1
11+
selector:
12+
matchLabels:
13+
app: api-testing
14+
strategy: {}
15+
template:
16+
metadata:
17+
creationTimestamp: null
18+
labels:
19+
app: api-testing
20+
spec:
21+
containers:
22+
- image: ghcr.io/linuxsuren/api-testing
23+
name: server
24+
resources:
25+
limits:
26+
cpu: "1"
27+
memory: 1Gi
28+
requests:
29+
cpu: "100m"
30+
memory: 100m
31+
status: {}
32+
---
33+
apiVersion: v1
34+
kind: Service
35+
metadata:
36+
name: api-testing
37+
spec:
38+
ports:
39+
- name: server
40+
port: 9090
41+
protocol: TCP
42+
targetPort: 9090
43+
selector:
44+
app: api-testing
45+
sessionAffinity: None
46+
type: NodePort

0 commit comments

Comments
 (0)