mahoney / docker-etc-hosts Goto Github PK
View Code? Open in Web Editor NEWAdds entries to /etc/hosts to allow addressing docker containers by name
License: GNU Affero General Public License v3.0
Adds entries to /etc/hosts to allow addressing docker containers by name
License: GNU Affero General Public License v3.0
Hi, @Mahoney !
I found you have the library which can help to automate the workflow of the binding IP addresses with Docker container names
I have tried on my mac to use your lib but without any success. I am wondering is it possible to use it without tuntap
?
Thanks.
The script currently requires bash 5
& needs to run as root (it alters /etc/hosts
).
A Mac comes with bash 3.2
(and zsh 5.x
).
brew install bash
on an M1/ARM64 Mac installs bash 5.x
, but to /opt/homebrew/bin
- which is not on root's path. (On an x64 Mac it is installed to /usr/local/bin
, which is on root's path, so it works.)
So #! /usr/bin/env bash
loads bash 3.2
.
Options:
/opt/homebrew/bin
zsh
which is installedbash 3.2
/usr/bin/env bash
resolve to bash 5.xI'm not a massive fan of any of them...
shopt -s extglob
and possibly then replacements for bash's ${sanitised//+([^A-Za-z0-9\.])/-}
, ${sanitised#[^[:alnum:]]}
& ${sanitised%[^[:alnum:]]}
variable substitutingchown
. Also I'd want to give specific instructions on the "right" way to do this and I'm not sure what that is - alter root's path to include /opt/homebrew/bin
I suppose, bit see objections to 1!A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.