Comments (3)
To add to this, I noticed that Takeout is now allowing passthrough parameters. However, there seems to be a small bug with that feature at the moment. I created a PR #302 to resolve this. Once we can get a fix merged in, it should be relatively simple to add a custom flag when enabling a container like so:
takeout enable mysql -- -v ~/Downloads:/var/downloads
from takeout.
It sounds like you want to mount a local path into the container so that a dump into that directory would be saved on your host system. Takeout does not offer a way to mount local paths. It only creates a default docker volume so that database data does not get lost when destroying a container.
By design, Takeout is opinionated in order to simplify the creation and destruction of service containers for developers that don't want to deal with the complexity of using vanilla docker commands.
What you are trying to do can be done with a little workaround. For example, you could grab the command that Takeout uses to enable your mysql container and add another -v
flag. An example command might look like this:
docker run -p 3306:3306 \
-e MYSQL_ROOT_PASSWORD=secret \
-e MYSQL_ALLOW_EMPTY_PASSWORD=true \
-e MYSQL_ROOT_HOST=% \
-v mysql_data:/var/lib/mysql \
-v ~/Downloads:/var/downloads \
mysql/mysql-server:8.0.31-amd64 --default-authentication-plugin=mysql_native_password
Just note that creating a container manually like this means that Takeout has no knowledge of the container and cannot help enabling/disabling it. You would need to run vanilla docker commands to do that.
docker ps
to list containers
docker stop CONTAINER_ID
to stop containers
docker start CONTAINER_ID
to start containers
docker rm CONTAINER_ID
to remove containers
docker volume ls
to list docker volumes
docker volume rm VOLUME_NAME
to remove volumes
from takeout.
Hey, @josecanhelp !
Thank you for your reply. I think your PR will allow doing what I want in Takeout.
I (and I think a lot of other devs) use this "behavior" to provide a way to easily restore database dumps inside a MySQL container: I copy the dump to the "~/Downloads"
, and after that, I access it in a container and when I navigate to the "/var/downloads"
I have my "~/Downloads"
from the host, that contains the dump.sql.
from takeout.
Related Issues (20)
- Dependency conflict from psr7 package HOT 3
- Tlint failing in GH Actions HOT 2
- "The provided cwd "" does not exist" error HOT 3
- Menu too tall for some screens HOT 5
- enable and start use different parameters HOT 3
- SQL Server on Mac M1 fails to start HOT 3
- PHP error in phar HOT 6
- PHP Error in Phar HOT 1
- Docker run command parameter order
- Typesense HOT 2
- New/better SingleStore dev image HOT 4
- Failed installing mongo HOT 2
- Compatibility issues with PHP 8.2 HOT 3
- ghcr.io containers HOT 3
- PHP 8.2 comatibility HOT 5
- Getting: Docker is not available error HOT 4
- After updating Mac OS, containers are missing HOT 2
- takeout enable soketi not working out of the box HOT 1
- takeout enable and disable commands are missing HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from takeout.