Skip to content

Commit

Permalink
📝 add Docker section to the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
techouse committed Dec 10, 2023
1 parent a4c1580 commit fb03cd0
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
[![codecov](https://codecov.io/gh/techouse/mysql-to-sqlite3/branch/master/graph/badge.svg)](https://codecov.io/gh/techouse/mysql-to-sqlite3)
[![GitHub stars](https://img.shields.io/github/stars/techouse/mysql-to-sqlite3.svg?style=social&label=Star&maxAge=2592000)](https://github.com/techouse/mysql-to-sqlite3/stargazers)


# MySQL to SQLite3

#### A simple Python tool to transfer data from MySQL to SQLite 3.
Expand All @@ -25,6 +24,7 @@ mysql2sqlite --help
```

### Usage

```
Usage: mysql2sqlite [OPTIONS]
Expand Down Expand Up @@ -83,4 +83,26 @@ Options:
--debug Debug mode. Will throw exceptions.
--version Show the version and exit.
--help Show this message and exit.
```
```

#### Docker image usage

If you don't want to install the tool on your system, you can use the Docker image instead.

```bash
docker run -it \
--workdir $(pwd) \
--volume $(pwd):$(pwd) \
--rm ghcr.io/techouse/mysql-to-sqlite3:latest \
--sqlite-file baz.db \
--mysql-user foo \
--mysql-password bar \
--mysql-database baz \
--mysql-host host.docker.internal
```

This will mount your host current working directory (pwd) inside the Docker container as the current working directory.
Any files Docker would write to the current working directory are written to the host directory where you did docker
run. Note that you have to also use a
[special hostname](https://docs.docker.com/desktop/networking/#use-cases-and-workarounds-for-all-platforms) `host.docker.internal`
to access your host machine from inside the Docker container.

0 comments on commit fb03cd0

Please sign in to comment.