forked from ofonimefrancis/frontman
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (25 loc) · 737 Bytes
/
Dockerfile
File metadata and controls
38 lines (25 loc) · 737 Bytes
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
# Use an official Golang runtime as a parent image
FROM golang:1.20.2-alpine AS build
# Install GNU Make
RUN apk add --no-cache make
# Set the working directory
WORKDIR /go/src/app
# Copy the source code to the container
COPY . .
# Build the binary using GNU Make
RUN CGO_ENABLED=0 make all
# Use an official lightweight Alpine image as a parent image
FROM alpine:latest
# Set the working directory
WORKDIR /app
# Copy the binary from the previous stage
COPY --from=build /go/src/app/bin/frontman .
WORKDIR /app
# Make the binary executable
RUN chmod +x /app/frontman
COPY frontman.yaml /app/frontman.yaml
COPY entrypoint.sh /app/entrypoint.sh
# Expose the ports
EXPOSE 8080 8000
# Start the service
CMD ["./entrypoint.sh"]