forked from KusionStack/kusion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
29 lines (25 loc) · 806 Bytes
/
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
# Build portal
FROM node:18 AS portal-builder
COPY ui /src/ui
WORKDIR /src/ui
RUN npm install
RUN npm run build
FROM golang:1.22 AS build
COPY / /src
COPY --from=portal-builder /src/ui/build /src/ui/build
WORKDIR /src
RUN --mount=type=cache,target=/go/pkg --mount=type=cache,target=/root/.cache/go-build SKIP_BUILD_PORTAL=true make build-local-linux
FROM --platform=linux/amd64 ubuntu:22.04 AS base
# Install KCL Dependencies
RUN apt-get update -y && apt-get install python3 python3-pip git -y
# KCL PATH
ENV PATH="/root/go/bin:${PATH}"
# KUSION
ENV KUSION_HOME="$HOME/.kusion"
ENV LANG=en_US.utf8
FROM base AS goreleaser
COPY kusion /usr/local/bin/kusion
RUN /usr/local/bin/kusion
FROM base
COPY --from=build /src/_build/bundles/kusion-linux/bin/kusion /usr/local/bin/kusion
RUN /usr/local/bin/kusion