add telegram bot and autossh tunnel
This commit is contained in:
24
bot/Dockerfile
Normal file
24
bot/Dockerfile
Normal file
@@ -0,0 +1,24 @@
|
||||
FROM oven/bun:1-debian AS deps
|
||||
WORKDIR /app
|
||||
COPY package.json ./
|
||||
RUN bun install --no-save
|
||||
|
||||
FROM oven/bun:1-debian
|
||||
WORKDIR /app
|
||||
|
||||
# docker CLI (to talk to host docker.sock), ssh + autossh (for portforward)
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
ca-certificates curl gnupg openssh-client autossh procps \
|
||||
&& install -m 0755 -d /etc/apt/keyrings \
|
||||
&& curl -fsSL https://download.docker.com/linux/debian/gpg \
|
||||
| gpg --dearmor -o /etc/apt/keyrings/docker.gpg \
|
||||
&& chmod a+r /etc/apt/keyrings/docker.gpg \
|
||||
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian bookworm stable" \
|
||||
> /etc/apt/sources.list.d/docker.list \
|
||||
&& apt-get update && apt-get install -y --no-install-recommends docker-ce-cli docker-compose-plugin \
|
||||
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY bot.ts tsconfig.json* ./
|
||||
|
||||
CMD ["bun", "run", "bot.ts"]
|
||||
Reference in New Issue
Block a user