-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5279677
commit cf792f8
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Build stage | ||
FROM golang:1.22-alpine AS builder | ||
|
||
WORKDIR /go/src/goignore | ||
|
||
# Install git | ||
RUN apk add --no-cache git | ||
|
||
# Clone the repository and build the goignore executable | ||
RUN git clone https://github.com/hacktivist123/goignore . && \ | ||
go build -o /go/bin/goignore ./cmd/goignore | ||
|
||
# goignore Container Image | ||
FROM alpine:latest | ||
|
||
# Maintainer info | ||
LABEL org.opencontainers.image.authors="Shedrack Akintayo" \ | ||
org.opencontainers.image.description="Container image for https://github.com/hacktivist123/goignore" | ||
|
||
# Set the working directory | ||
WORKDIR /goignore | ||
|
||
# Copy the goignore executable from the builder stage | ||
COPY --from=builder /go/bin/goignore /usr/local/bin/goignore | ||
|
||
# Set the entrypoint | ||
ENTRYPOINT [ "goignore" ] |