Socket
Book a DemoInstallSign in
Socket

harbordock

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

harbordock

0.1.1
bundlerRubygems
Version published
Maintainers
1
Created
Source

⚓️ Harbor ⚓️

Tired of copying & pasting between different Dockerfiles? Harbor lets you take the re-useable parts of your Dockerfiles and combine them into one.

Disclaimer

This gem is not officially supported by Docker. Use at your own risk.

Installation

Add this line to your application's Gemfile:

gem 'harbordock'

And then execute:

$ bundle

Or install it yourself as:

$ gem install harbordock

Usage

This gem takes Dockerfile instructions written in a Harborfile and outputs them to a Dockerfile. Harborfiles are just like Dockerfiles, except they support the INCLUDE directive. Files get included from ~/.harbor/harborfiles and must have a .harbor extension name.

Example Harborfile:

FROM ubuntu

# Harbofiles support INCLUDE
INCLUDE ruby-2.3 # <- Located at ~/.harbor/harborfiles/ruby-2.3.harbor

RUN echo "Hello world"
# ~/.harbor/harborfiles/ruby-2.3.harbor
RUN sudo apt-get install ruby2.3 ruby2.3-dev
RUN touch test.rb

The resulting Dockerfile looks like:

FROM ubuntu

# Harbofiles support INCLUDE
# ~/.harbor/harborfiles/ruby-2.3.harbor
RUN sudo apt-get install ruby2.3 ruby2.3-dev
RUN touch test.rb

RUN echo "Hello world"

Command Line

$ harbor <YOUR_HARBORFILE> [<DOCKERFILE_OUTPUT_PATH>]

Ruby

require 'harbor'
Harbor::Harborfile.new('./Harborfile')
# Dockerfile written to ./Dockerfile

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/leethomas/harbor. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

Author & License

Lee Thomas
leet944@gmail.com
The gem is available as open source under the terms of the MIT License.

FAQs

Package last updated on 26 Oct 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.