forked from jitsucom/jitsu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconsole.Dockerfile
39 lines (29 loc) · 1.14 KB
/
console.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
38
39
# Run `docker login`, use jitsucom account
# Build & push it with
# docker buildx build --platform linux/amd64 . -f console.Dockerfile --push -t jitsucom/console:latest
FROM node:16-bullseye-slim as builder
RUN apt-get update -y
RUN apt-get install nano curl git openssl1.1 procps python3 make g++ bash netcat -y
# Create app directory
WORKDIR /app
RUN npm -g install pnpm
COPY pnpm-lock.yaml .
RUN --mount=type=cache,id=onetag_pnpm,target=/root/.local/share/pnpm/store/v3 pnpm fetch
COPY . .
RUN --mount=type=cache,id=onetag_pnpm,target=/root/.local/share/pnpm/store/v3 pnpm install -r --unsafe-perm
RUN --mount=type=cache,id=console_turborepo,target=/app/node_modules/.cache/turbo pnpm build
#RUN pnpm build
#Remove env files to prevent accidental leaks of credentials
RUN rm .env*
#FROM node:16-bullseye-slim AS runner
#RUN apt-get install bash
#RUN npm -g install pnpm
#WORKDIR /app
#RUN addgroup --system --gid 1001 runner
#RUN adduser --system --uid 1001 runner
#USER runner
#
#COPY --from=builder /app/ .
EXPOSE 3000
HEALTHCHECK CMD curl --fail http://localhost:3000/api/healthcheck || exit 1
ENTRYPOINT ["sh", "-c", "./docker-start-console.sh"]