Skip to content

Instantly share code, notes, and snippets.

@dvgamerr
Created January 9, 2023 17:03
Show Gist options
  • Save dvgamerr/131134b67ba44873a4878a4aed27ed24 to your computer and use it in GitHub Desktop.
Save dvgamerr/131134b67ba44873a4878a4aed27ed24 to your computer and use it in GitHub Desktop.
database-docker-command

MySQL $ docker run --name my-mysql -e MYSQL_ROOT_PASSWORD=password -d mysql:latest

PostgreSQL $ docker run --name my-postgres -e POSTGRES_PASSWORD=mysecretpassword -d -p 5432:5432 postgres

Oracle 12c $ docker run -d --name oracle12c -p 1521:1521 container-registry.oracle.com/database/enterprise:12.2.0.1

MariaDB $ docker run --name my-mariadb -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mariadb

Microsoft SQL Server $ docker run -d -p 1433:1433 -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=<YourStrong!Passw0rd>' mcr.microsoft.com/mssql/server:latest

MongoDB $ docker run --name my-mongo -d mongo

Cassandra $ docker run --name cassandra -d cassandra:latest

Couchbase $ docker run -d --name my-couchbase-container -p 8091-8094:8091-8094 -p 11210:11210 couchbase

Redis $ docker run --name my-redis -d redis

Neo4j $ docker run
--publish=7474:7474 --publish=7687:7687
--volume=$HOME/neo4j/data:/data
neo4j:latest

Elasticsearch $ docker run -d --name elasticsearch -p 9200:9200 -p 9300:9300 elasticsearch

CouchDB $ docker run -d -p 5984:5984 --name my-couchdb couchdb $ docker run -d -p 5984:5984 --name my-couchdb couchdb:2.0 $ docker run -d -p 5984:5984 --name my-couchdb couchdb:1.6

RethinkDB $ docker run --name rethinkdb -d rethinkdb

InfluxDB $ docker run -d -p 8086:8086 --name influxdb influxdb

OrientDB $ docker run -d --name orientdb -p 2424:2424 -p 2480:2480 orientdb/orientdb

Memcache $ docker run --name my-memcache -d memcached memcached -m 64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment