Whois with NodeJS Docker Image

I’m trying to get Whois working in NodeJS on a Dockerfile. I’m using Whois-UX (which just spawns a whois process with the whois linux command. I’m using the “node:argon” docker image, but it doesn’t have whois installed. There doesn’t seem to be a way to apt-get install whois inside the image either.

I then tried to use “ubuntu:12.04″, but I’m having trouble running the app with it. Here is my Dockerfile:

  • Connecting inside container at docker environment using JSCH
  • docker-compose gives error “ImportError: No module named ssl_match_hostname” when run as normal user
  • Mongodb won't start in Docker container when remote-mounting a volume from host
  • Dockerize MySQL with database and tables
  • Golang High GC pause times on docker/kubernets
  • How to get mac host IP address from a docker container?
  • FROM ubuntu:12.04
    WORKDIR /srv
    ADD . /srv
    RUN apt-get update
    RUN apt-get install -y curl
    RUN curl -sL https://deb.nodesource.com/setup | bash -
    RUN apt-get install -y nodejs git git-core whois
    RUN npm install
    CMD ["node /srv/server.js"]

    So, there are two possible solutions that I don’t know how to solve. Figure out how to get whois on the node:argon image, or get the ubuntu docker image to work. I’d rather get whois on node:argon, because of optimizations for NodeJS, but as long as it works, it’ll do.

    Thanks for the help!

  • How to make tweaks to a Docker base image?
  • How to set proxy on rstudio from dockerhub behind a proxy?
  • How to properly start nginx in Docker
  • how can I get the AUFS kernel module on a Google Compute Engine (GCE) kernel?
  • How do I access Windows eventlog of a Docker container
  • Load TensorFlow weights on docker container
  • One Solution collect form web for “Whois with NodeJS Docker Image”

    Whelp. I got it.

    I forgot to apt-get update before I apt-get installed whois, so it didn’t show the repository as being up.

    FROM node:argon
    RUN mkdir -p /usr/src/app
    WORKDIR /usr/src/app
    RUN apt-get update
    RUN apt-get install whois
    RUN npm install bower -g
    COPY package.json /usr/src/app/
    RUN npm install
    COPY . /usr/src/app
    RUN bower install --allow-root
    CMD ["npm", "start"]

    ^ This worked.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.