class RubyYacht::Hook::CopyFileBehavior
This class provides a behavior for copying a file from the host machine to the image.
Attributes
file_path[R]
:method: file_path
The path to the file that this behavior copies.
Public Class Methods
new(file_path)
click to toggle source
This initialize creates the behavior.
### Parameters
-
**file_path: String** The path to the file, relative to the root of
the project.
# File lib/ruby_yacht/dsl/hook.rb, line 214 def initialize(file_path) @file_path = file_path end
Public Instance Methods
dockerfile_command()
click to toggle source
The command that should be run in a Dockerfile for this behavior.
# File lib/ruby_yacht/dsl/hook.rb, line 219 def dockerfile_command "COPY #{File.basename(file_path)} /var/docker/" end