-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
Description
Dockerfile:
# can't build on latest node version v21.0.0, because of this issue:
# https://github.com/nodejs/node/issues/50269
# neither on bun, because of this issue:
# https://github.com/oven-sh/bun/issues/4671
FROM docker.io/node:20-alpine AS base
FROM base AS builder
WORKDIR /build
COPY . .
ENV HUSKY 0
ENV STANDALONE 1
RUN corepack enable
RUN corepack prepare pnpm@latest --activate
RUN pnpm install
RUN pnpm build
FROM golang:1.21-bookworm as wing
RUN \
apt-get update; apt-get install -y git make llvm-15 clang-15; \
apt-get clean autoclean && apt-get autoremove -y && rm -rf /var/lib/{apt,dpkg,cache,log}/
# build bundle process
ENV CGO_ENABLED=0
ENV CLANG=clang-15
WORKDIR /build/wing
COPY ./wing .
RUN make deps
RUN go build -o dae-wing
FROM base AS runner
WORKDIR /app
COPY --from=builder /build/public ./public
RUN mkdir .next
COPY --from=builder /build/.next/standalone .
COPY --from=builder /build/.next/static ./.next/static
ENV NODE_ENV production
COPY --from=wing /build/wing/dae-wing /usr/local/bin
EXPOSE 3000
CMD dae-wing run -c ./etc/dae-wing --api-only & node server.jssudo docker run -it \
--privileged \
--network=host \
--pid=host \
--restart=always \
-v /sys:/sys \
-v /etc/daed:/etc/dae-wing \
--name=daed-next \
next