I've run an image with: 'docker-compose up'
With 'docker ps' i get:
CREATED STATUS PORTS NAMES
55e1fd18acf1 simpleappnodedocker_web "node app.js" 6 seconds ago Up 6 seconds 0.0.0.0:9000->3000/tcp myapp
9879ff20e241 postgres:9.6 "docker-entrypoint..." 36 hours ago Up 36 hours 0.0.0.0:5432->5432/tcp nd-db
I try run the bash to enter to the shell, but i get an error, how to solve this, i thinking i'm doing something wrong.
$docker-compose run myapp /bin/bash
ERROR: No such service: myapp
docker-compose.yml:
version: '2'
services:
web:
container_name: myapp
build: .
command: node app.js
ports:
- "9000:3000"