Public Repository

Last pushed: 2 years ago
Short Description
Berkshelf API Server
Full Description

Berkshelf API

Building

docker build --rm -t berkshelf-api .

Running

This container expects berkshelf-api config at /etc/berkshelf. It exposes the
default berkshelf-api port of 26200. Put your berkshelf api config.json file
and pem in a handy directoy, and mount it as a data volume.

docker run --rm -v /path/to/conf/dir:/etc/berkshelf -p 26200:26200 berkshelf-api

Example config file

    {
      "home_path": "/etc/berkshelf",
      "endpoints": [
        {
          "type": "chef_server",
          "options": {
            "url": "https://api.opscode.com/organizations/<YOUR_ORG_NAME>",
            "client_name": "<CLIENT_NAME>",
            "client_key": "/etc/berkshelf/<YOUR_PEM_NAME>.pem"
          }
        }
      ],
      "build_interval": 5.0
    }

Dockerfile:

FROM phusion/passenger-ruby22

ENV DEBIAN_FRONTEND noninteractive

RUN apt-get -y update
RUN apt-get -y install libarchive-dev

RUN gem install berkshelf-api

RUN mkdir /etc/berkshelf

RUN mkdir /etc/service/berkshelf-api
ADD berkshelf-api.sh /etc/service/berkshelf-api/run

CMD ["/sbin/my_init"]

EXPOSE 26200

RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

berkshelf-api.sh referenced:

#!/bin/sh

exec berks-api -c /etc/berkshelf/config.json
Docker Pull Command
Owner
mydrive

Comments (1)
docwhat
3 years ago

Source?