FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
bitsocial-cli/Dockerfile at master · bitsocialnet/bitsocial-cli · GitHub
bitsocialnet
/
bitsocial-cli
Public
Notifications
You must be signed in to change notification settings
Fork
4
Star
23
Code
Issues
4
Pull requests
3
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
bitsocial-cli
/
Dockerfile
Copy path
More file actions
More file actions
Latest commit
History
History
History
69 lines (46 loc) · 2.28 KB
Breadcrumbs
bitsocial-cli
/
Dockerfile
Copy path
File metadata and controls
69 lines (46 loc) · 2.28 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#
---- Builder stage ----
FROM
node:22-slim AS builder
RUN
apt-get update && apt-get install -y --no-install-recommends git ca-certificates python3 make g++ && rm -rf /var/lib/apt/lists/*
RUN
corepack enable npm && corepack prepare npm@11.13.0 --activate
WORKDIR
/app
COPY
package.json package-lock.json ./
RUN
npm ci --ignore-scripts --network-timeout 600000 && npm pkg delete scripts.postinstall && npm rebuild && npm cache clean --force
COPY
src/ src/
COPY
bin/ bin/
COPY
ci-bin/ ci-bin/
COPY
config/ config/
RUN
npm run build && npx oclif manifest
RUN
--mount=type=secret,id=github_token \
GITHUB_TOKEN=$(cat /run/secrets/github_token 2>/dev/null || true) npm run ci:download-web-uis
#
---- Production dependencies ----
FROM
node:22-slim AS deps
RUN
apt-get update && apt-get install -y --no-install-recommends git ca-certificates python3 make g++ && rm -rf /var/lib/apt/lists/*
RUN
corepack enable npm && corepack prepare npm@11.13.0 --activate
WORKDIR
/app
COPY
package.json package-lock.json ./
RUN
npm pkg delete scripts.prepare scripts.postinstall && npm ci --omit=dev --ignore-scripts --network-timeout 600000 && npm rebuild && npm cache clean --force
#
---- Runtime stage ----
FROM
node:22-slim
RUN
apt-get update && apt-get install -y --no-install-recommends tini git ca-certificates && rm -rf /var/lib/apt/lists/*
RUN
groupadd --gid 1001 bitsocial && \
useradd --uid 1001 --gid bitsocial --shell /bin/bash --create-home bitsocial
WORKDIR
/app
COPY
--from=deps /app/node_modules/ node_modules/
COPY
package.json package-lock.json ./
COPY
--from=builder /app/dist/ dist/
COPY
--from=builder /app/oclif.manifest.json ./
COPY
bin/ bin/
RUN
chmod +x bin/run
RUN
ln -s /app/bin/run /usr/local/bin/bitsocial
RUN
mkdir -p /data /logs && chown -R bitsocial:bitsocial /data /logs /app
USER
bitsocial
ENV
XDG_DATA_HOME=/data
ENV
XDG_STATE_HOME=/logs
ENV
KUBO_RPC_URL=
"http://0.0.0.0:50019/api/v0"
ENV
IPFS_GATEWAY_URL=
"http://0.0.0.0:6473"
EXPOSE
9138 50019 6473 4001
VOLUME
[
"/data"
,
"/logs"
]
HEALTHCHECK
--interval=30s --timeout=10s --start-period=60s --retries=3 \
CMD
node -e
"const net=require('net');const s=net.connect(9138,'localhost',()=>{s.end();process.exit(0)});s.on('error',()=>process.exit(1));setTimeout(()=>process.exit(1),5000)"
ENTRYPOINT
[
"tini"
,
"--"
]
CMD
[
"bitsocial"
,
"daemon"
]
Back
|
FazBrowse Home
|
New Git URL