
Security News
Nx npm Packages Compromised in Supply Chain Attack Weaponizing AI CLI Tools
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Tired of copying & pasting between different Dockerfiles? Harbor lets you take the re-useable parts of your Dockerfiles and combine them into one.
This gem is not officially supported by Docker. Use at your own risk.
Add this line to your application's Gemfile:
gem 'harbordock'
And then execute:
$ bundle
Or install it yourself as:
$ gem install harbordock
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"
$ harbor <YOUR_HARBORFILE> [<DOCKERFILE_OUTPUT_PATH>]
require 'harbor'
Harbor::Harborfile.new('./Harborfile')
# Dockerfile written to ./Dockerfile
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.
Lee Thomas
leet944@gmail.com
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that harbordock demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.