ci(docker): init docker files
This commit is contained in:
parent
bc20345fc0
commit
a178db87fb
25
Dockerfile
Normal file
25
Dockerfile
Normal file
@ -0,0 +1,25 @@
|
||||
FROM public.ecr.aws/docker/library/golang:1.23.4-bookworm AS build
|
||||
|
||||
# Set destination for COPY
|
||||
WORKDIR /app
|
||||
|
||||
# Download Go modules
|
||||
COPY go.mod go.sum ./
|
||||
RUN --mount=type=cache,target="/go" go mod download -x
|
||||
|
||||
COPY . .
|
||||
|
||||
# Build
|
||||
ENV GOCACHE=/root/.cache/go-build
|
||||
RUN --mount=type=cache,target="/go" --mount=type=cache,target="/root/.cache/go-build" CGO_ENABLED=1 GOOS=linux go build -o /flink-kube-operator ./cmd/operator
|
||||
|
||||
|
||||
FROM busybox:1.36.1 AS final
|
||||
|
||||
|
||||
COPY --from=build /flink-kube-operator /flink-kube-operator
|
||||
|
||||
EXPOSE 8083
|
||||
|
||||
# Run
|
||||
CMD ["/flink-kube-operator"]
|
||||
14
Dockerfile.flink
Normal file
14
Dockerfile.flink
Normal file
@ -0,0 +1,14 @@
|
||||
FROM public.ecr.aws/docker/library/flink:1.20.0-scala_2.12-java17
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /opt/flink
|
||||
|
||||
# Set environment variables for Flink mini-cluster
|
||||
ENV FLINK_HOME /opt/flink
|
||||
ENV PATH=$FLINK_HOME/bin:$PATH
|
||||
|
||||
# Expose necessary ports for the Flink UI (JobManager) and job manager
|
||||
EXPOSE 8081 6123
|
||||
|
||||
# Command to start Flink JobManager and TaskManager in a mini-cluster setup
|
||||
CMD ["bin/start-cluster.sh"]
|
||||
Loading…
x
Reference in New Issue
Block a user