Skip to content

Commit

Permalink
优化Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Hoshino-Yumetsuki authored May 27, 2024
1 parent 5129648 commit 3cff849
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/server/hf-space/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
FROM alpine AS build
FROM node:lts-slim AS build

RUN adduser -D app
RUN useradd -m app

USER root
RUN apk --no-cache add curl nodejs npm

RUN npm i tkserver -g
RUN npm i -g tkserver

WORKDIR /home/app
RUN curl -LO https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 && \
chmod +x cloudflared-linux-amd64 && \
mv cloudflared-linux-amd64 /usr/local/bin/cloudflared
ADD https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 /usr/local/bin/cloudflared
RUN chmod +x /usr/local/bin/cloudflared

COPY ./src/start.sh /usr/bin/start.sh

Expand Down

0 comments on commit 3cff849

Please sign in to comment.