The following docker-compose file is a combination of the default template from docker and my additions. I'm trying to, when executing docker-compose up, create a default database (mydb.db in this example).
version: '3'
services:
sqlite3:
image: nouchka/sqlite3:latest
container_name: sqlite
stdin_open: true
tty: true
entrypoint: /usr/bin/sqlite3
command:
- /usr/bin/sqlite3 mydb.db;
volumes:
- ./db/:/root/db/
However, no database is being created. If I manually enter the container docker exec -it sqlite bash and type sqlite3 mydb.db;, it behaves as expected.
Am I understanding what command does incorrectly? I'm not an expert at docker by any stretch.