Files
mrvacommander/client/containers/ghmrva/Dockerfile
2024-08-29 13:22:59 -07:00

31 lines
710 B
Docker

# Use an official Golang image as the base image
FROM golang:1.22 AS builder
# Set the working directory inside the container
WORKDIR /work-gh/mrva/gh-mrva
# Clone the repository
RUN git clone https://github.com/hohn/gh-mrva.git . &&\
git checkout hohn-0.1.24-demo
# Download dependencies
RUN go mod download
# Build the Go binary
RUN go build .
# # Set the entrypoint
# CMD ["/bin/bash"]
# Use a minimal base image for the final container
FROM debian:bookworm
# Set the working directory inside the final image
WORKDIR /app
# Copy the binary from the builder stage
COPY --from=builder /work-gh/mrva/gh-mrva/gh-mrva /usr/local/bin/gh-mrva
# Set the entrypoint to the binary
ENTRYPOINT ["gh-mrva"]