FROM ubuntu:18.04
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils vagrant && \
apt-get autoclean && \
apt-get autoremove && \
vagrant plugin install vagrant-libvirt
COPY startup.sh /
ENTRYPOINT ["/startup.sh" ]
Just run this from your Mac terminal and it'll drop you in a container with full permissions on the Docker VM. This also works for Docker for Windows for getting in Moby Linux VM (doesn't work for Windows Containers).
docker run -it --rm --privileged --pid=host justincormack/nsenter1
more info: https://github.com/justincormack/nsenter1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::{fmt, io}; | |
struct TodoItem { | |
id: usize, | |
title: String, | |
completed: bool, | |
deleted: bool, | |
} | |
struct TodoList { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Example for the Docker Hub V2 API | |
# Returns all images and tags associated with a Docker Hub organization account. | |
# Requires 'jq': https://stedolan.github.io/jq/ | |
# set username, password, and organization | |
UNAME="" | |
UPASS="" | |
ORG="" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
du -cks * | sort -rn | head -11 | |
# Usually set this up in my bash profile as an alias: | |
# alias ducks='du -cks * | sort -rn | head -11' | |
# Because it is fun to type ducks on the command line. :) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# A simple test script to demonstrate how to find the | |
# "absolute path" at which a script is running. Used | |
# to avoid some of the pitfals of using 'pwd' or hard- | |
# coded paths when running scripts from cron or another | |
# directory. | |
# | |
# Try it out: | |
# run the script from the current directory, then |