@@ -6,10 +6,12 @@ ARG BUN_VERSION=1.1.13-alpine
6
6
# FROM node:${NODE_VERSION} as build
7
7
FROM oven/bun:${BUN_VERSION} as build
8
8
9
- RUN apk add git linux-headers build-base
10
-
9
+ # we need nodejs for node-gyp anyway :sob:
10
+ RUN apk add git linux-headers build-base nodejs npm
11
+ # RUN apt update && apt install -y git build-essential
11
12
ENV PYTHONUNBUFFERED=1
12
13
RUN apk add --update python3 && ln -sf python3 /usr/bin/python
14
+ # RUN apt install -y python3 python3-pip
13
15
RUN python3 -m ensurepip
14
16
RUN pip3 install --no-cache --upgrade pip setuptools
15
17
@@ -22,26 +24,25 @@ COPY --link . ./
22
24
RUN git submodule update --init --recursive
23
25
# RUN pnpm config set fetch-retries 5
24
26
RUN --mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked \
25
- bun i --frozen-lockfile -- aggregate-output --build_v8_with_gn=false
27
+ bun i --aggregate-output
26
28
RUN bun run --bun build
27
29
RUN bun scripts/trim-deps.mjs
28
30
RUN mv packages/frontend/assets sharkey-assets
29
- RUN --mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked \
30
- bun run --bun prune
31
+ # RUN --mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked \
32
+ # bun run --bun prune
31
33
RUN rm -r node_modules packages/frontend packages/sw
32
34
RUN --mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked \
33
- bun i --prod --frozen-lockfile --aggregate-output
35
+ bun i --production --aggregate-output
34
36
RUN rm -rf .git
35
37
36
- FROM oven/bun:1.1.13-debian
38
+ FROM oven/bun:${BUN_VERSION}
37
39
38
40
ARG UID="991"
39
41
ARG GID="991"
40
42
41
- RUN apt update && apt install -y ffmpeg tini
42
-
43
- RUN groupadd -g ${GID} sharkey \
44
- && useradd -u ${UID} -g ${GID} sharkey \
43
+ RUN apk add ffmpeg tini jemalloc \
44
+ && addgroup -g "${GID}" sharkey \
45
+ && adduser -D -u "${UID}" -G sharkey -h /sharkey sharkey \
45
46
&& find / -type d -path /sys -prune -o -type d -path /proc -prune -o -type f -perm /u+s -exec chmod u-s {} \; \
46
47
&& find / -type d -path /sys -prune -o -type d -path /proc -prune -o -type f -perm /g+s -exec chmod g-s {} \;
47
48
0 commit comments