updated README
This commit is contained in:
+10
-4
@@ -9,19 +9,25 @@ RUN apk add --no-cache docker-cli tini curl;
|
||||
# ----- map container 'docker' group to host docker.sock GID -----
|
||||
# pass the host's docker.sock GID at build time: --build-arg DOCKER_GID=$(stat -c '%g' /var/run/docker.sock)
|
||||
ARG DOCKER_GID=977
|
||||
|
||||
# create (or reuse) a group with that GID, then add the existing 'bun' user to it
|
||||
RUN addgroup -g "${DOCKER_GID}" -S docker || true \
|
||||
&& addgroup bun docker;
|
||||
|
||||
RUN chown -R bun:bun /app
|
||||
|
||||
# switch to the nonroot bun user (already default in the base image, but explicit is nice)
|
||||
USER bun
|
||||
|
||||
# your app
|
||||
COPY index.ts ./index.ts
|
||||
# files
|
||||
COPY package.json .
|
||||
COPY index.ts .
|
||||
COPY openapi.json .
|
||||
|
||||
RUN bun i
|
||||
|
||||
# expose your tool server
|
||||
EXPOSE 8787
|
||||
ENV PORT=8787
|
||||
|
||||
# default docker host path; adjust if you mount elsewhere
|
||||
ENV DOCKER_HOST=unix:///var/run/docker.sock
|
||||
|
||||
|
||||
Reference in New Issue
Block a user