Skip to content

Commit c6330d4

Browse files
committed
📝 add Docker section to the readme
1 parent 0ed4bc1 commit c6330d4

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,26 @@ Options:
7676
--debug Debug mode. Will throw exceptions.
7777
--version Show the version and exit.
7878
--help Show this message and exit.
79-
```
79+
```
80+
81+
#### Docker image usage
82+
83+
If you don't want to install the tool on your system, you can use the Docker image instead.
84+
85+
```bash
86+
docker run -it \
87+
--workdir $(pwd) \
88+
--volume $(pwd):$(pwd) \
89+
--rm ghcr.io/techouse/sqlite3-to-mysql:latest \
90+
--sqlite-file baz.db \
91+
--mysql-user foo \
92+
--mysql-password bar \
93+
--mysql-database baz \
94+
--mysql-host host.docker.internal
95+
```
96+
97+
This will mount your host current working directory (pwd) inside the Docker container as the current working directory.
98+
Any files Docker would write to the current working directory are written to the host directory where you did docker
99+
run. Note that you have to also use a
100+
[special hostname](https://docs.docker.com/desktop/networking/#use-cases-and-workarounds-for-all-platforms) `host.docker.internal`
101+
to access your host machine from inside the Docker container.

0 commit comments

Comments
 (0)