Skip to content

Instantly share code, notes, and snippets.

@iamstoick
iamstoick / import.md
Created June 14, 2017 05:03
How to import database in MySQL in Docker?

This is a simple way of importing MySQL database in Docker.

  1. In you Dockerfile you must have a shared folder. Shared folder is a directory in your host machine that is mounted to Docker instance.

  2. Put the exported sql file in the shared folder.

  3. Login to your Docker instance via docker exec -it DOCKER_CONTAINER_ID bin/bash.

  4. Login to MySQL via mysql -u USERNAME -p.

@CMCDragonkai
CMCDragonkai / makeWrapper_and_wrapProgram.md
Created August 24, 2018 07:50
makeWrapper and wrapProgram #nix

makeWrapper and wrapProgram

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.

@heathdrobertson
heathdrobertson / 01_nixos_vim_container.md
Last active August 18, 2023 12:07
Setup Neovim using a NixOS Docker container.

Neovim IDE

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 \