Skip to content

Commit

Permalink
revert(linux): DOCKER_CONFIG path (#1102) (#1110)
Browse files Browse the repository at this point in the history
Revert "fix(linux): DOCKER_CONFIG path (#1102)"

This reverts commit 5b45b75.

Signed-off-by: Justin Alvarez <[email protected]>
  • Loading branch information
pendo324 authored Sep 23, 2024
1 parent 3c98320 commit 839221c
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 15 deletions.
1 change: 0 additions & 1 deletion cmd/finch/main_native.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ var newApp = func(
logger,
fp.NerdctlConfigFilePath(),
fp.BuildkitSocketPath(),
fp.DockerConfigDir(),
fp.FinchDependencyBinDir(),
system.NewStdLib(),
)
Expand Down
5 changes: 0 additions & 5 deletions pkg/command/nerdctl_native.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
const (
EnvKeyNerdctlTOML = "NERDCTL_TOML"
EnvKeyBuildkitHost = "BUILDKIT_HOST"
EnvKeyDockerConfig = "DOCKER_CONFIG"
)

type nerdctlCmdCreator struct {
Expand All @@ -29,7 +28,6 @@ type nerdctlCmdCreator struct {
systemDeps NerdctlCmdCreatorSystemDeps
nerdctlConfigPath string
buildkitSocketPath string
dockerConfigPath string
binPath string
}

Expand All @@ -41,7 +39,6 @@ func NewNerdctlCmdCreator(
logger flog.Logger,
nerdctlConfigPath string,
buildkitSocketPath string,
dockerConfigPath string,
binPath string,
systemDeps NerdctlCmdCreatorSystemDeps,
) NerdctlCmdCreator {
Expand All @@ -50,7 +47,6 @@ func NewNerdctlCmdCreator(
logger: logger,
nerdctlConfigPath: nerdctlConfigPath,
buildkitSocketPath: buildkitSocketPath,
dockerConfigPath: dockerConfigPath,
binPath: binPath,
systemDeps: systemDeps,
}
Expand All @@ -69,7 +65,6 @@ func (ncc *nerdctlCmdCreator) create(stdin io.Reader, stdout, stderr io.Writer,
newPathEnv = append(
newPathEnv,
fmt.Sprintf("%s=%s", EnvKeyNerdctlTOML, ncc.nerdctlConfigPath),
fmt.Sprintf("%s=%s", EnvKeyDockerConfig, ncc.dockerConfigPath),
fmt.Sprintf("%s=unix://%s", EnvKeyBuildkitHost, ncc.buildkitSocketPath),
)

Expand Down
3 changes: 0 additions & 3 deletions pkg/command/nerdctl_native_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import (
const (
mockNerdctlConfigPath = "/etc/finch/nerdctl.toml"
mockBuildkitSocketPath = "/etc/finch/buildkit"
mockDockerConfigPath = "/etc/finch/docker"
mockFinchBinPath = "/usr/lib/usrexec/finch"
mockSystemPath = "/usr/bin"
finalPath = mockFinchBinPath + command.EnvKeyPathJoiner + mockSystemPath
Expand Down Expand Up @@ -48,7 +47,6 @@ func TestLimaCmdCreator_Create(t *testing.T) {
cmd.EXPECT().SetEnv([]string{
fmt.Sprintf("%s=%s", command.EnvKeyPath, finalPath),
fmt.Sprintf("%s=%s", command.EnvKeyNerdctlTOML, mockNerdctlConfigPath),
fmt.Sprintf("%s=%s", command.EnvKeyDockerConfig, mockDockerConfigPath),
fmt.Sprintf("%s=unix://%s", command.EnvKeyBuildkitHost, mockBuildkitSocketPath),
})
cmd.EXPECT().SetStdin(nil)
Expand All @@ -74,7 +72,6 @@ func TestLimaCmdCreator_Create(t *testing.T) {
logger,
mockNerdctlConfigPath,
mockBuildkitSocketPath,
mockDockerConfigPath,
mockFinchBinPath,
lcd,
).Create(mockArgs...)
Expand Down
6 changes: 0 additions & 6 deletions pkg/path/finch_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,6 @@ func (fp Finch) BuildkitSocketPath() string {
return filepath.Join(fp.FinchRuntimeDataDir(), "buildkit", "buildkitd.sock")
}

// DockerConfigDir returns the path to the docker config file.
// nerdctl uses ${DOCKER_CONFIG}/config.json for authentication with image registries.
func (fp Finch) DockerConfigDir() string {
return filepath.Join(string(fp), "docker")
}

// FinchDependencyBinDir returns the path to Finch's local helper or dependency binaries.
// Currently used for vended version of BuildKit.
func (Finch) FinchDependencyBinDir() string {
Expand Down

0 comments on commit 839221c

Please sign in to comment.