Skip to content

Commit

Permalink
add dockerfile (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
hacktivist123 authored May 30, 2024
1 parent 5279677 commit cf792f8
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions Dockerfile
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" ]

0 comments on commit cf792f8

Please sign in to comment.