Code Monkey home page Code Monkey logo

macinfo_docker_img's Introduction

macinfo_docker_img

Get Mac info from https://macaddress.io api request

app.py

Python code uses urllib python library to call macaddress.ip rest-full api.

Building image.

Image build specification is written in Dockerfile and have entrypoint script called macaddr. macaddr script will pass two paramter to app.py which is mac address and API_KEY Following command is used to build the image

docker build --tag=macinfo .

  • Sending build context to Docker daemon 69.63kB

  • Step 1/5 : FROM python:3.6-slim

  • Step 2/5 : WORKDIR /app

  • Step 3/5 : COPY app.py /app

  • Step 4/5 : COPY macaddr /app

  • Step 5/5 : ENTRYPOINT ["/app/macaddr"]

  • Successfully built 5d0dd17c6b9b

  • Successfully tagged macinfo:latest

Running Image.

Following command is used to run the docker image. API_KEY can be obtained by signing up at macaddress.io website and we need to pass mac address for which we want information.

docker run -e API_KEY=xxxxxxxxx macinfo 44:38:39:ff:ef:57

MAC_ADDRESS=44:38:39:ff:ef:57,COMPANY_NAME=Cumulus Networks, Inc

macinfo_docker_img's People

Contributors

rajeshm9 avatar

Watchers

James Cloos avatar

Forkers

myang32

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.