jackbenny / subnetcalc-docker

A Dockerized version of my simple subnet calculator :whale:

Home Page:https://hub.docker.com/r/jackbenny/subnetcalc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

subnetcalc

A simple subnet calculator written in C, statically compiled, and then Dockerized. The Dockerized version was created as a demonstration on how to create really small Docker images from scratch.

Docker Image Size (latest by date) Docker Pulls Docker Stars Docker Cloud Automated build Docker Cloud Build Status

Manual build

If you would like to build it yourself, instead of running the pre-compiled image from Docker Hub, simple type make. This will create a image called subnetcalc. If you get a is up to date-message, instead run make --always-make.

Usage

Run it (remove jackbenny/ if you would like to run it from your local build) and enter the subnet mask in slash notation – but without the slash.

For example enter 24 for a 24-bit subnet mask and the program will output the total number of addresses in the range aswell as the total number of usable addresses for hosts.

$> docker run -it --rm jackbenny/subnetcalc
Enter netmask in slash-notation without the slash: 24
Netmask bit: 24

256 total addresses
254 usable addresses for hosts

About

A Dockerized version of my simple subnet calculator :whale:

https://hub.docker.com/r/jackbenny/subnetcalc

License:Other


Languages

Language:C 77.7%Language:Makefile 12.1%Language:Dockerfile 10.1%