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:

  • How to access a Tensorflow docker instance from the “outside” without Jupyter - for distributed Tensorflow
  • Docker Named Volume location Mac
  • Get list of docker tags available to pull from command line?
  • Docker : /var/run/docker.sock: no such file or directory
  • Use apt-get fails on docker python:2.7.12-wheezy image
  • Dockerize wordpress
  • 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 expose several ports for docker container?
  • Deploying Cassandra on ECS?
  • Microservice registration with Eureka replicas in docker swarm cluster
  • Execute command on docker container from remote machine
  • Configuring hazelcast on a docker overlay network
  • Running bvlc-caffe docker image as non-root user results in unexpected NVCC flags
  • 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.