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 does docker treat child process when we send stop to pid 1
  • fallocate failing inside my docker container
  • Docker: user change in terminal prompt
  • Configuring docker to communicate over the network
  • Docker-compose: Can I automate compose to run commands inside a container?
  • AWS ECS volumes do not share any files
  • 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!

  • What is the interaction of Docker's CpuShares between containers?
  • Determining if a process runs inside windows/iis
  • how to use pip to install pkg from requirement file without reinstall
  • Running Xephyr inside a docker container
  • SSH server does not accept connections
  • Does docker verify images? If so, how is it implemented?
  • 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.