#Hey guys, I just missed last release

1 messages ยท Page 1 of 1 (latest)

dense pilot
narrow sequoia
#

it seems related but not exactly same.

#

Currently I'm having trouble to find way,

  • Loading working automatically like we do with Host and loading unix sockets from Host
tidal echo
#

not 100% sure what the plan for UnixSocket is though

#

So I think the idea would be to explicitly pass unix sockets around as well

#

But I don't think it's possible to create them at the CLI today sadly

ornate spear
#

@narrow sequoia what are you using the unix socket for? What's its path? Need some real user data to decide on a design ๐Ÿ˜๐Ÿ™

narrow sequoia
#

sometime I need to access docker using cli and I'm forwarding custom docker unix socket to gale container using host and optional user input

#

This is just an example code to use native docker

    // configure docker using docker host when docker is enabled and dind is not enabled
    if r.RunnerOpts.UseNativeDocker && !r.RunnerOpts.UseDind {
        switch {
        case strings.HasPrefix(r.RunnerOpts.DockerHost, "unix://"):
            dh := strings.TrimPrefix(r.RunnerOpts.DockerHost, "unix://")

            ctr = ctr.WithUnixSocket("/var/run/docker.sock", dag.Host().UnixSocket(dh))
            ctr = ctr.WithEnvVariable("DOCKER_HOST", "unix:///var/run/docker.sock")
        case strings.HasPrefix(r.RunnerOpts.DockerHost, "tcp://"):
            ctr = ctr.WithEnvVariable("DOCKER_HOST", r.RunnerOpts.DockerHost)
        default:
            return nil, fmt.Errorf("unsupported docker host: %s", r.RunnerOpts.DockerHost)
        }
    }
#

it's okay to ditch unix socket and Host().Directory but I would need to similar solutions to workaround these issues

#

We have a talk tomorrow in Berlin Devops Meetup and trying to update some project codes, that's why it's kind a urgent :/

tidal echo
narrow sequoia
#

no worries, I'm already rolled back 0.9.5. If there is no workaround, i'll use this version

#

no need to keep latest in the talk

ornate spear
#

So the solution is not a missing host function, but supporting socket arguments in the CLI @tidal echo @wicked cypress

narrow sequoia
#

yea seems like it. I don't have any preference about the way. I said host since it was containing functionality but I'm okay with any type of access.

supporting socket arguments feels better. ๐Ÿ™‡โ€โ™‚๏ธ