You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/modules/databases/jdbc.md
+12
Original file line number
Diff line number
Diff line change
@@ -84,6 +84,18 @@ public class JDBCDriverTest {
84
84
...
85
85
```
86
86
87
+
### Copying files to the container
88
+
89
+
You may copy files into the container by specifying `TC_COPY_FILES`.
90
+
This is useful for supplying custom configuration files or utilizing the entrypoint of a Docker image to run scripts.
91
+
92
+
The syntax is: `?TC_COPY_FILES=host-path:container-path[:file-mode]` (file mode is optional).
93
+
If the host path starts with `/` it will be considered an absolute path, otherwise it's mapped from a classpath resource.
94
+
95
+
* Single file: `jdbc:tc:mysql:5.7.34:///databasename?TC_COPY_FILES=some-path/init_mysql.sql:/docker-entrypoint-initdb.d/init_mysql.sql`
96
+
* Single file with file mode: `jdbc:tc:mysql:5.7.34:///databasename?TC_COPY_FILES=some-path/init_mysql.sql:/docker-entrypoint-initdb.d/init_mysql.sql:755`
By default database container is being stopped as soon as last connection is closed. There are cases when you might need to start container and keep it running till you stop it explicitly or JVM is shutdown. To do this, add `TC_DAEMON` parameter to the URL as follows:
0 commit comments