File tree 2 files changed +10
-9
lines changed
2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change 1
- # Stage 1: Build the Go binary
2
- FROM golang:1.17 AS builder
1
+ # build stage
2
+ FROM golang:1.20.12-alpine3.19 as builder
3
+
4
+ ENV GO111MODULE=on
3
5
4
- # Set the working directory inside the container
5
6
WORKDIR /app
6
7
7
- # Copy the go.mod and go.sum files to download dependencies
8
- COPY go.mod go. sum ./
8
+ COPY go.mod .
9
+ COPY go.sum .
9
10
10
- # Download dependencies
11
11
RUN go mod download
12
12
13
- # Copy the source code into the container
14
13
COPY . .
15
14
16
- # Build the Go binary
17
- RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o s6-cli .
15
+ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o s6-cli -v ./cmd/s6cli
16
+
18
17
19
18
# Stage 2: Create a minimal image for running the binary
20
19
FROM scratch
Original file line number Diff line number Diff line change 63
63
# RUN COMMANDS OF CLI WITH DEFAULT ARGS
64
64
# ==================================================================================== #
65
65
66
+ # # lint: lint s6-overlay folders and files
66
67
.PHONY : lint
67
68
lint :
68
69
@go run ./cmd/s6cli $(ARGS ) lint
69
70
71
+ # # mermaid: generate mermaid graph
70
72
.PHONY : mermaid
71
73
mermaid :
72
74
@go run ./cmd/s6cli $(ARGS ) mermaid
You can’t perform that action at this time.
0 commit comments