Skip to content
hakk
  • Home
  • Blog
  • Docs
  • DSA
  • Snippets

Docker

  • Convert Images to WebP using the Linux command line and Docker 2023-12-09

    The webp command line tool from Google makes it quite simple to convert images to the webp format from the command line. It can convert JPG, PNG, and TIFF images to WebP. Not sure what webp is? Read more about webp on Wikipedia.

    If you don’t have Docker installed on your system already, go ahead and install it now.

    Spin up a Debian Bookworm docker container and mount the directory with your images to the container.

  • Install OpenWRT x86 64 Using an A/B Partition Setup 2023-10-30

    A quick reference for OpenWRT Installation.

    Prepare a bootable Debian USB

    You can use another distro if you’d like. I use Debian as a personal perference and also because it’s relatively quick to create a live USB.

    Download a “standard” Debian ISO image from here https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/.

    At the time of writing, I’m using debian-live-12.2.0-amd64-standard.iso file. You may see a more recent version, but make sure you download the “-standard.iso” file. After downloading be sure to verify against the SHA256SUMS or SHA512SUMS.

  • Vagrant Ubuntu with Docker install 2022-03-09

    Creating an Ubuntu VirtualBox and installing Docker.

    Vagrantfile

    Vagrant.configure("2") do |config|
      config.vm.box = "ubuntu/bionic64"
      
      config.vm.define "docker-1" do |node|
        node.vm.hostname = "docker-1"
        config.vm.box_check_update = false
        config.vm.network "public_network"
        config.vm.provider "virtualbox" do |vb|
          vb.name = "docker-1"
          vb.memory = "2048"
          vb.cpus = "2"
        end
    
        node.vm.provision "install-docker", type: "shell", :path => "ubuntu/install-docker-2.sh"
      end
      
    end
    

    install-docker-2.sh

    cd /tmp
    curl -fsSL https://get.docker.com -o get-docker.sh
    sh /tmp/get-docker.sh
    
    vagrant up
    

    Wait for the virtual machines to get created and started. Then ssh into it.

    vagrant ssh docker-1
    

    Add the vagrant user to the docker group (this could probably be added to the script).

  • Building a VirtualBox ISO with Packer 2022-03-08

    I wanted to try building my own Vagrant base box, I decided to use one of the chef bento templates for ease.

    It was moving along nicely, downloaded the ISO, verified the checksum and suddenly this error appears.

    VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component MachineWrap, interface IMachine packer
    

    Not quite sure where to start I decided to do a quick Google, read some posts about VirtualBox modules. I was quite sure that wasn’t my issue. So I went to GitHub where I saw a couple of issues that said set headless to true. Being new to packer, I didn’t really understand what that meant. After more reading I finally found it and decided I’d make this quick post about it.

Recent posts
  • Understanding the ss Command: A Modern Alternative to netstat
  • Understanding HTTP from Scratch with Python Sockets
  • When Environment Variables Mysteriously Reset...
  • How to Generate a 32-byte Key for AES Encryption
  • Streamlining Deployment: Installing Docker, Gitea, Gitea Act Runner, and Nginx on Ubuntu
© 2025 hakk
  • Home
  • Blog
  • Docs
  • DSA
  • Snippets