How should I run thumbd as a service inside a Docker container?

I’d like to run thumbd as a service inside a node Docker image! At the moment I’m just running it before I start my app, which is no use to me! Is there a way I could setup my Dockerfile to run it as an init.d service on startup without blocking any of my other docker commands?

My Dockerfile goes as follows:

  • Connection Refused for Spark on Docker
  • Deleting files inside docker container not freeing up space on host system
  • kitchen-docker: How to run a shell command before kitchen converge
  • Freeing unnecessary Docker image's space
  • How to put fluentd containers behind a load balancer in ECS?
  • docker mysql start failed, unable to create temporary file, permission denied
  • FROM node:6.2.0
    # Create app directory
    RUN mkdir -p /usr/src/app
    WORKDIR /usr/src/app
    # Install app dependencies
    COPY package.json /usr/src/app/
    RUN npm install
    # Thumbd
    RUN npm install -g thumbd
    RUN mkdir -p /var/log/
    RUN echo "" > /var/log/thumbd.log
    RUN thumbd server --aws_key=<KEY> --aws_secret=<SECRET> --sqs_queue=<QUEUE> --bucket=<BUCKET> --aws_region=us-west-1 --s3_acl=public-read
    # Bundle app source
    COPY . /usr/src/app
    EXPOSE 8080
    CMD npm run build && npm start

  • How Docker container volumes work even when they aren't running?
  • How use my docker-compose configuration with gitlab CI
  • Docker for mac not starting after latest version upgrade Version 1.12.1 (build: 12133) 2d5b4d9c3daa089e3869e6355a47dd96dbf39856
  • Docker save only non public layers
  • Docker image dns probem, name solve failed
  • “tput: No value for $TERM and no -T specified ” error on docker [on hold]
  • One Solution collect form web for “How should I run thumbd as a service inside a Docker container?”

    It’s probably easiest to run thumbd in it’s own container due to the way it works without direct links to your application. Docker likes to push the idea of a single process per container too.

    FROM node:6.2.0
    # Thumbd
    RUN set -uex; \
        npm install -g thumbd; \
        mkdir -p /var/log/; \
        touch /var/log/thumbd.log
    CMD thumbd server --aws_key=<KEY> --aws_secret=<SECRET> --sqs_queue=<QUEUE> --bucket=<BUCKET> --aws_region=us-west-1 --s3_acl=public-read

    You can use Docker Compose to orchestrate running multiple containers in your project.

    If you really want to run multiple processes in a container, use an init system like s6 or possibly supervisord.

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