-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
37 lines (26 loc) · 1.01 KB
/
Dockerfile
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
# Start with Alpine and Go base image
FROM golang:1.20-alpine as build
# Install necessary dependencies for Go, GCC, musl-dev, git, OpenJDK, and other utilities
RUN apk add --no-cache gcc musl-dev git openjdk11 bash
# Set up Go workspace
WORKDIR /app
COPY . .
# Build the Go application
RUN go build -o myapp
# Create the final image with only the binary, and include Java Runtime and necessary packages
FROM alpine:latest
# Install OpenJDK for Java Runtime Environment (JRE)
RUN apk add --no-cache openjdk11
# Install other necessary dependencies for running Windsurf and your app
RUN apk add --no-cache bash
# Set up the working directory
WORKDIR /root/
# Copy the Go binary from the build stage
COPY --from=build /app/myapp .
# Expose the port your app will run on
EXPOSE 8080
# Add Windsurf installation instructions here if needed
# This could involve downloading and installing Windsurf from the appropriate source,
# or using a prebuilt binary compatible with Alpine
# Set entrypoint for your app
CMD ["./myapp"]