-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfixGeoCodes.dockerfile
More file actions
36 lines (26 loc) · 963 Bytes
/
fixGeoCodes.dockerfile
File metadata and controls
36 lines (26 loc) · 963 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
# Use the official .NET SDK image as the base image
FROM golang:1.22.1-alpine3.19 AS builder
# Set working directory for the build context
WORKDIR /app
# Copy the source files first
COPY *.go ./
# Copy necessary utilities to their respective directories
COPY utils/*.go ./utils/
COPY ApiModels/*.go ./ApiModels/
# Copy dependencies files
COPY go.mod go.sum ./
# Install dependencies
RUN go mod download && go mod verify
# Build the application (replace with your own build command)
# Assuming your main entry point is in cmd/main.go
RUN go build -o FixGeoCodes .
# Use a smaller image for running the application
FROM alpine
# Copy the compiled binary from the builder stage
COPY --from=builder /app/FixGeoCodes /app/FixGeoCodes
# Set the working directory for the application
WORKDIR /app
# Set the entrypoint to 'som'
ENTRYPOINT ["./FixGeoCodes"]
# Expose the port your application listens on (if applicable)
# EXPOSE 8080 # Example: Expose port 8080