Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
iGoogle-ink committed May 10, 2023
1 parent a0c0a5a commit 768430c
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,23 @@

# Go workspace file
go.work

# idea ignore
.idea/
.vscode/
.vendor/
*.ipr
*.iml
*.iws

# system ignore
.DS_Store
Thumbs.db

# temp ignore
*.log
*.cache
*.diff
*.patch
*.tmp
main
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## v0.0.1

1. 项目启动,初始化
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM registry.cn-hangzhou.aliyuncs.com/fmm-ink/golang:1.19.9 AS builder
WORKDIR /build
COPY . /build

RUN go env -w GO111MODULE=on && go env -w GOPROXY=https://goproxy.cn,direct && go env -w GOSUMDB=off && go mod tidy
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags "-s -w -extldflags '-static'" -o main main.go

FROM registry.cn-hangzhou.aliyuncs.com/fmm-ink/alpine:3.18
WORKDIR /app

RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories && apk add --no-cache curl net-tools busybox-extras iproute2
COPY --from=builder /build/main /usr/bin/main

CMD ["main"]
5 changes: 5 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package main

func main() {

}

0 comments on commit 768430c

Please sign in to comment.