I am trying to deploy a Node SDK on azure app service through docker container. In my sdk, I have mounted a connection file & written a docker-compose for this. But when I deploy it by azure I get below error.
InnerException: Docker.DotNet.DockerApiException, Docker API responded with status code=InternalServerError, response={"message":"invalid volume specification: ':/usr/src/app/connection.json'"}
docker-compose.yml
version: '2'
services:
node:
container_name: node
image: dhiraj1990/node-app:latest
command: [ "npm", "start" ]
ports:
- "3000:3000"
volumes:
- ${WEBAPP_STORAGE_HOME}/site/wwwroot/connection.json:/usr/src/app/connection.json
connection.json is present at this path /site/wwwroot
.
Dockerfile
FROM node:8
# Create app directory
WORKDIR /usr/src/app
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./
RUN npm install
# If you are building your code for production
# RUN npm ci --only=production
# Bundle app source
COPY . .
EXPOSE 3000
Please tell me what is the issue ?