Skip to content
View davelooi's full-sized avatar

Block or report davelooi

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
davelooi/README.md

Local Docker DB Cheatsheet

MySQL

MySQL 5.7

Start a detached server at host port 3306

docker run --name=mysql57 -e MYSQL_ROOT_PASSWORD=password -p 3306:3306 -d mysql/mysql-server:5.7

For M1 Macs

docker run --platform linux/amd64 --name=mysql57 -e MYSQL_ROOT_PASSWORD=password -p 3306:3306 -d mysql/mysql-server:5.7

Connect to docker container

docker exec -it mysql57 mysql -p

Create superuser

create user looi@'%' identified by 'password';
grant all on *.* to looi@'%';
flush privileges;

MySQL 8.0

Start a detached server at host port 3307

docker run --name=mysql80 -e MYSQL_ROOT_PASSWORD=password -p 3307:3306 -d mysql/mysql-server:8.0 --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci

Connect to docker container

docker exec -it mysql80 mysql -p

Create superuser

create user looi@'%' identified by 'password';
grant all on *.* to looi@'%';
flush privileges;

Redis

Redis 5.0

Start a detached redis server at host port 6379

docker run --name=redis1 -p 6379:6379 -d redis:5.0

RedisInsight

Start a detached redis insight server at host port 8001

docker run -d --name=redisinsight -v redisinsight:/db -p 8001:8001 redislabs/redisinsight:latest

PostgreSQL

PostgreSQL 12.7

Start a detached server at host port 5432

docker run --name postgres12 -e POSTGRES_PASSWORD=password -d -p 5432:5432 postgres:12.7

Connect to the container

docker exec -it postgres12 psql --username postgres --password

Connect as default user

psql --host=127.0.0.1 --username=postgres --password

Create superuser

create user looi with superuser password 'password';

MongoDB

MongoDB 6.0

Start a detached server at host port 27017

docker run -d --name mongodb1 -p 27017:27017 -e MONGO_INITDB_ROOT_USERNAME=mongoadmin -e MONGO_INITDB_ROOT_PASSWORD=secret mongo:6.0

DynamoDB

Start a detached dynamodb-local server at port 8000

docker run -d --name=dynamodb1 -p 8000:8000 amazon/dynamodb-local:latest

Selenium

Selenium Chrome

Start a remote standalone selenium chrome

docker run --name selenium1 -d -p 4444:4444 -p 7900:7900 --shm-size="2g" selenium/standalone-chrome:96.0

Pinned Loading

  1. http_multipart_parser http_multipart_parser Public

    Parse HTTP multipart response

    Ruby 1 3

  2. lambda-scheduler lambda-scheduler Public

    Sub-minute lambda scheduler

    Ruby

  3. ruby-saml-f ruby-saml-f Public

    Forked from SAML-Toolkits/ruby-saml

    SAML SSO for Ruby

    Ruby

  4. s3-select s3-select Public

    Demo for AWS S3 select object

    Ruby

  5. docker DBs docker DBs
    1
    # Start a new mysql 5.7 DB at host port 3306
    2
    docker run --name=mysql57 -e MYSQL_ROOT_PASSWORD=password -p 3306:3306 -d mysql/mysql-server:5.7
    3
    # Connect to docker container
    4
    docker exec -it mysql57 mysql -p
    5
    # Create superuser
  6. coinjar/ccxt coinjar/ccxt Public

    Forked from ccxt/ccxt

    A JavaScript / Python / PHP cryptocurrency trading API with support for more than 120 bitcoin/altcoin exchanges

    JavaScript 1 1