commit
5316b24769
|
|
@ -61,7 +61,7 @@ func (a *AddCommand) ExecuteCommand(config *manifest.Schema2Config) error {
|
||||||
// 1. Unpack them to the specified destination
|
// 1. Unpack them to the specified destination
|
||||||
// 2. Remove it as a source that needs to be copied over
|
// 2. Remove it as a source that needs to be copied over
|
||||||
// If any of the sources is a remote file URL:
|
// If any of the sources is a remote file URL:
|
||||||
// 1. Download and copy it to the specifed dest
|
// 1. Download and copy it to the specified dest
|
||||||
// 2. Remove it as a source that needs to be copied
|
// 2. Remove it as a source that needs to be copied
|
||||||
for src, files := range srcMap {
|
for src, files := range srcMap {
|
||||||
for _, file := range files {
|
for _, file := range files {
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ func (r *RunCommand) FilesToSnapshot() []string {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Author returns some information about the command for the image config
|
// CreatedBy returns some information about the command for the image config
|
||||||
func (r *RunCommand) CreatedBy() string {
|
func (r *RunCommand) CreatedBy() string {
|
||||||
cmdLine := strings.Join(r.cmd.CmdLine, " ")
|
cmdLine := strings.Join(r.cmd.CmdLine, " ")
|
||||||
if r.cmd.PrependShell {
|
if r.cmd.PrependShell {
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ import (
|
||||||
|
|
||||||
// sourceImage is the image that will be modified by the executor
|
// sourceImage is the image that will be modified by the executor
|
||||||
|
|
||||||
// InitializeSourceImage initializes the source image with the base image
|
// NewSourceImage initializes the source image with the base image
|
||||||
func NewSourceImage(srcImg string) (*img.MutableSource, error) {
|
func NewSourceImage(srcImg string) (*img.MutableSource, error) {
|
||||||
if srcImg == constants.NoBaseImage {
|
if srcImg == constants.NoBaseImage {
|
||||||
return img.NewMutableSource(nil)
|
return img.NewMutableSource(nil)
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ResolveEnvironmentReplacement resolves a list of values by calling resolveEnvironmentReplacement
|
// ResolveEnvironmentReplacementList resolves a list of values by calling resolveEnvironmentReplacement
|
||||||
func ResolveEnvironmentReplacementList(values, envs []string, isFilepath bool) ([]string, error) {
|
func ResolveEnvironmentReplacementList(values, envs []string, isFilepath bool) ([]string, error) {
|
||||||
var resolvedValues []string
|
var resolvedValues []string
|
||||||
for _, value := range values {
|
for _, value := range values {
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ func checkHardlink(p string, i os.FileInfo) (bool, string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// UnpackLocalTarArchive unpacks the tar archive at path to the directory dest
|
// UnpackLocalTarArchive unpacks the tar archive at path to the directory dest
|
||||||
// Returns true if the path was acutally unpacked
|
// Returns true if the path was actually unpacked
|
||||||
func UnpackLocalTarArchive(path, dest string) error {
|
func UnpackLocalTarArchive(path, dest string) error {
|
||||||
// First, we need to check if the path is a local tar archive
|
// First, we need to check if the path is a local tar archive
|
||||||
if compressed, compressionLevel := fileIsCompressedTar(path); compressed {
|
if compressed, compressionLevel := fileIsCompressedTar(path); compressed {
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ func Hasher() func(string) (string, error) {
|
||||||
return hasher
|
return hasher
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hasher returns a hash function, which only looks at mtime to determine if a file has changed
|
// MtimeHasher returns a hash function, which only looks at mtime to determine if a file has changed
|
||||||
func MtimeHasher() func(string) (string, error) {
|
func MtimeHasher() func(string) (string, error) {
|
||||||
hasher := func(p string) (string, error) {
|
hasher := func(p string) (string, error) {
|
||||||
h := md5.New()
|
h := md5.New()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue