File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 1+ # Build stage
2+ FROM golang:1.22-alpine AS builder
3+
4+ WORKDIR /go/src/goignore
5+
6+ # Install git
7+ RUN apk add --no-cache git
8+
9+ # Clone the repository and build the goignore executable
10+ RUN git clone https://github.com/hacktivist123/goignore . && \
11+ go build -o /go/bin/goignore ./cmd/goignore
12+
13+ # goignore Container Image
14+ FROM alpine:latest
15+
16+ # Maintainer info
17+ LABEL org.opencontainers.image.authors="Shedrack Akintayo" \
18+ org.opencontainers.image.description="Container image for https://github.com/hacktivist123/goignore"
19+
20+ # Set the working directory
21+ WORKDIR /goignore
22+
23+ # Copy the goignore executable from the builder stage
24+ COPY --from=builder /go/bin/goignore /usr/local/bin/goignore
25+
26+ # Set the entrypoint
27+ ENTRYPOINT [ "goignore" ]
You can’t perform that action at this time.
0 commit comments