Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
37 lines (25 loc) · 801 Bytes

File metadata and controls

37 lines (25 loc) · 801 Bytes
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
FROM golang:1.20-alpine AS builder
WORKDIR /app
# Copy go.mod and go.sum files to download dependencies
COPY go.mod ./
# Assuming you have a go.sum file
# COPY go.sum ./
# Download all dependencies
RUN go mod download
# Copy the source code
COPY . .
# Build the application
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o ar ./cmd/ar
# Start a new stage from scratch
FROM alpine:latest
RUN apk --no-cache add ca-certificates
WORKDIR /root/
# Copy the pre-built binary from the previous stage
COPY --from=builder /app/harness-cli .
# Copy the config file template
COPY --from=builder /app/config.yaml.example ./config.yaml.example
# Create a volume for configuration and logs
VOLUME ["/root/config", "/root/logs"]
# Command to run
ENTRYPOINT ["./harness-cli"]
CMD ["--help"]
Morty Proxy This is a proxified and sanitized view of the page, visit original site.