I am trying to create a node server using Docker but I am getting and error on ‘FROM’ instruction and I have no clue what is going on, never seen that before. Does anyone knows how to solve it?
No source image provided with `FROM`dockerfile-utils(20)
Unknown instruction: FROM:dockerfile-utils(38)
Dockerfile
FROM: node:16-alpine
WORKDIR /app/backend
COPY package.json /app/backend
RUN npm install
COPY . /app/backend/
EXPOSE 3001
CMD [ "npm", "run", "dev" ]
docker-compose
version: "3.1"
services:
backend:
build: ./
container_name: node_container
tty: true
stdin_open: true
restart: always
working_dir: /app/backend
volumes:
- ./:/app/backend
depends_on:
- mysqldb
ports:
- 3001:3001
mysqldb:
image: mysql:8.0.26
container_name: mysqldb_container
restart: always
ports:
- 3307:3306
2
Answers
remove the colon from the
FROM
commandYour dockerfile’s FROM shouldn’t contain :
Remove the ":" from the FROM