Neovim IDE in a NixOS Docker Container
docker run --volumes-from=nix -it \
-v $(pwd):/home \
-w /home \
--name <change-me> \
-p 9005:9005 \
-p 3000:3000 \
Nix generally assumes run-time dependencies is a subset of the build-time dependencies.
This means many Nix builder functions try to automatically scan the output for runtime dependencies and "rewrite" them for runtime usage.
However shell scripts which are often exported by packages do not get this automatic scanning treatment.
This means you have to use the makeWrapper
package and use either the makeWrapper
or wrapProgram
utility functions.
This is a simple way of importing MySQL database in Docker.
In you Dockerfile you must have a shared folder. Shared folder is a directory in your host machine that is mounted to Docker instance.
Put the exported sql file in the shared folder.
Login to your Docker instance via docker exec -it DOCKER_CONTAINER_ID bin/bash
.
Login to MySQL via mysql -u USERNAME -p
.