Error “gnu/stubs-32.h: No such file or directory” while compiling Nachos source code

You’re missing the 32 bit libc dev package: On Ubuntu it’s called libc6-dev-i386 – do sudo apt-get install libc6-dev-i386. See below for extra instructions for Ubuntu 12.04. On Red Hat distros, the package name is glibc-devel.i686 (Thanks to David Gardner’s comment). On CentOS 5.8, the package name is glibc-devel.i386 (Thanks to JimKleck’s comment). On CentOS … Read more

How to permanently add a private key with ssh-add on Ubuntu? [closed]

A solution would be to force the key files to be kept permanently, by adding them in your ~/.ssh/config file: IdentityFile ~/.ssh/gitHubKey IdentityFile ~/.ssh/id_rsa_buhlServer If you do not have a ‘config’ file in the ~/.ssh directory, then you should create one. It does not need root rights, so simply: nano ~/.ssh/config …and enter the lines … Read more

What is the best practice of docker + ufw under Ubuntu

Problem This problem has been around for a long time. Disable iptables in Docker will take other problems. Rollback changes first If you have modified your server according to the current solution that we find on the internet, please rollback these changes first, including: Enable Docker’s iptables feature. Remove all changes like –iptables=false , including … Read more

Allow docker container to connect to a local/host postgres database

TL;DR Use 172.17.0.0/16 as IP address range, not 172.17.0.0/32. Don’t use localhost to connect to the PostgreSQL database on your host, but the host’s IP instead. To keep the container portable, start the container with the –add-host=database:<host-ip> flag and use database as hostname for connecting to PostgreSQL. Make sure PostgreSQL is configured to listen for … Read more