Question

Mount volume to a Docker app

Hello! I have a Docker application with Node.JS inside which is launched as an App. I’d like to mount a Volume to the App, how can I do this? I have Dockerfile and app.yaml:

app.yaml:

name: media-server
services:
  - dockerfile_path: Dockerfile
    github:
      branch: master
      deploy_on_push: true
      repo: name/media-server
    name: node
    http_port: 3010

Dockerfile:

FROM node:16-alpine as builder
RUN apk add --update --no-cache file imagemagick
RUN mkdir -p /home/node/app/node_modules && chown -R node:node /home/node/app
WORKDIR /home/node/app
COPY package.json yarn.lock ./
USER node
RUN yarn install
COPY --chown=node:node . .
RUN yarn build
CMD ["yarn", "start"]
EXPOSE 3010

Thank you in advance!


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer