Docker volume issue

Hi, trying to run my bot inside of a docker container on my server (exposing the workdir to the host for changes).

Yes, these files are stolen from the official repos.

Current bind shows no files on the host and the attached error when trying to run the container. If I run the container without any mount points then it runs fine.
# ================ #
#    Base Stage    #
# ================ #

FROM node:20-bullseye-slim as base

WORKDIR /usr/src/app

# ENV YARN_DISABLE_GIT_HOOKS=1
ENV CI=true
ENV LOG_LEVEL=info
ENV FORCE_COLOR=true

RUN apt-get update && \
    apt-get upgrade -y --no-install-recommends && \
    apt-get install -y --no-install-recommends build-essential python3 dumb-init && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/* && \
    apt-get autoremove

COPY --chown=node:node yarn.lock .
COPY --chown=node:node package.json .
COPY --chown=node:node .yarnrc.yml .
COPY --chown=node:node .yarn/ .yarn/

ENTRYPOINT ["dumb-init", "--"]

# ================ #
#   Builder Stage  #
# ================ #

FROM base as builder

# ENV NODE_ENV="development"

# COPY --chown=node:node tsconfig.base.json .
COPY --chown=node:node tsconfig.json .
# COPY --chown=node:node tsup.config.ts .
# COPY --chown=node:node prisma/ prisma/
COPY --chown=node:node src/ src/

RUN yarn install --immutable
# RUN yarn run build

# ================ #
#   Runner Stage   #
# ================ #

# FROM base AS runner

ENV NODE_ENV="production"
ENV NODE_OPTIONS="--enable-source-maps"

# COPY --chown=node:node src/.env src/.env
# COPY --chown=node:node --from=builder /usr/src/app/dist dist

# RUN yarn workspaces focus --all --production

# Patch .prisma with the built files
# COPY --chown=node:node --from=builder /usr/src/app/node_modules/.prisma node_modules/.prisma

RUN chown node:node /usr/src/app/

USER node

CMD [ "yarn", "run", "watch:start" ]


version: '3.9'

services:
  lyra:
    build:
      context: ../
    volumes:
      - .:/usr/src/app
    container_name: lyra
    logging:
      options:
        max-size: '1g'
        max-file: '3'
    networks:
      - infi
    restart: always
    tty: true
    image: healthcareusa/lyra:latest

networks:
  infi:
Solution
No but you can make the GH action that also published the new image to run that command on the server
Was this page helpful?