Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(lang): Set PATH in envd #1127

Closed
gaocegege opened this issue Oct 31, 2022 · 5 comments · Fixed by #1218
Closed

feat(lang): Set PATH in envd #1127

gaocegege opened this issue Oct 31, 2022 · 5 comments · Fixed by #1218

Comments

@gaocegege
Copy link
Member

Description

Ref #1103


Message from the maintainers:

Love this enhancement proposal? Give it a 👍. We prioritise the proposals with the most 👍.

@gaocegege
Copy link
Member Author

Ref moby/buildkit#2415

@VoVAllen
Copy link
Member

VoVAllen commented Nov 1, 2022

Currently in envd, environment variable is set by passing arguments to docker client.

Config: v1.ImageConfig{

This means PATH=$PATH:/usr/bin won't work.

@gaocegege
Copy link
Member Author

Yep. It does not work. We need to implement the substitution in envd by ourselves, like buildkit docker frontend does.

@gaocegege
Copy link
Member Author

It is not in high priority I think.

We have a workaround

def build():
    shell("zsh")
    install_golang_1_18_4()

def install_golang_1_18_4():
    run(
        [
            "wget https://go.dev/dl/go1.18.4.linux-amd64.tar.gz && tar -C /usr/local -xzf go1.18.4.linux-amd64.tar.gz",
        ]
    )
    # Make PATH substitution in another run enable wget cache.
    run([
            'echo "export PATH=$PATH:/usr/local/go/bin" >> /home/envd/.bashrc',
            'echo "export PATH=$PATH:/usr/local/go/bin" >> /home/envd/.zshrc',
    ])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants