Skip to content

Commit fb03cd0

Browse files
committed
📝 add Docker section to the readme
1 parent a4c1580 commit fb03cd0

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

README.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
[![codecov](https://codecov.io/gh/techouse/mysql-to-sqlite3/branch/master/graph/badge.svg)](https://codecov.io/gh/techouse/mysql-to-sqlite3)
1313
[![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)
1414

15-
1615
# MySQL to SQLite3
1716

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

2726
### Usage
27+
2828
```
2929
Usage: mysql2sqlite [OPTIONS]
3030
@@ -83,4 +83,26 @@ Options:
8383
--debug Debug mode. Will throw exceptions.
8484
--version Show the version and exit.
8585
--help Show this message and exit.
86-
```
86+
```
87+
88+
#### Docker image usage
89+
90+
If you don't want to install the tool on your system, you can use the Docker image instead.
91+
92+
```bash
93+
docker run -it \
94+
--workdir $(pwd) \
95+
--volume $(pwd):$(pwd) \
96+
--rm ghcr.io/techouse/mysql-to-sqlite3:latest \
97+
--sqlite-file baz.db \
98+
--mysql-user foo \
99+
--mysql-password bar \
100+
--mysql-database baz \
101+
--mysql-host host.docker.internal
102+
```
103+
104+
This will mount your host current working directory (pwd) inside the Docker container as the current working directory.
105+
Any files Docker would write to the current working directory are written to the host directory where you did docker
106+
run. Note that you have to also use a
107+
[special hostname](https://docs.docker.com/desktop/networking/#use-cases-and-workarounds-for-all-platforms) `host.docker.internal`
108+
to access your host machine from inside the Docker container.

0 commit comments

Comments
 (0)