Skip to content

Why are GOARCH and GOOS set in the container? #6748

@hanoii

Description

@hanoii

I set myself to add go to my ddev projects, the reason behind this is multi-fold, but I wanted to

go install github.com/skx/sysbox@latest

I have other ways of installing it but I used this as a way to learn a bit on go on its own, and I noticed that go install github.com/skx/sysbox was building it as darwin_arm64 and that led to to try to understand why and I learned that GOOS and GOARCH are exported from the host.

I have many ways around this, even unsetting this, but I wonder if there's an actual reason for this or if maybe these variables should not be set?

ddev/pkg/ddevapp/ddevapp.go

Lines 2440 to 2441 in dd09a1a

"GOOS": runtime.GOOS,
"GOARCH": runtime.GOARCH,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions