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

Error building hello-world application when following Getting Started guide #15

Open
inliquid opened this issue May 24, 2023 · 3 comments

Comments

@inliquid
Copy link

Describe the bug

I'm following this guide: https://www.okteto.com/docs/samples/golang/

When trying to deploy via okteto deploy --build it stops with error:

$ okteto deploy --build
 i  Using default @ kind-kind as context
 i  Building 'Dockerfile' using your local docker daemon
[+] Building 1.4s (8/8) FINISHED
 => [internal] load .dockerignore                                                                                                                                                                             0.0s
 => => transferring context: 2B                                                                                                                                                                               0.0s
 => [internal] load build definition from Dockerfile                                                                                                                                                          0.0s
 => => transferring dockerfile: 176B                                                                                                                                                                          0.0s
 => [internal] load metadata for docker.io/library/golang:buster                                                                                                                                              1.1s
 => [1/4] FROM docker.io/library/golang:buster@sha256:6be60119fd752c3ee530cb13f778801af1519a6b40e58539545c546d6e04b610                                                                                        0.0s
 => [internal] load build context                                                                                                                                                                             0.0s
 => => transferring context: 2.49kB                                                                                                                                                                           0.0s
 => CACHED [2/4] WORKDIR /app                                                                                                                                                                                 0.0s
 => CACHED [3/4] ADD . .                                                                                                                                                                                      0.0s
 => ERROR [4/4] RUN go build -o /usr/local/bin/hello-world                                                                                                                                                    0.3s
------
 > [4/4] RUN go build -o /usr/local/bin/hello-world:
okteto/okteto#8 0.208 error obtaining VCS status: exit status 128
okteto/okteto#8 0.208        Use -buildvcs=false to disable VCS stamping.
------
 x  Error building service 'hello-world': error building image (status code 1) : process "/bin/sh -c go build -o /usr/local/bin/hello-world" did not complete successfully: exit code: 1

To Reproduce
Steps to reproduce the behavior:

I suspect just follow Getting Started doc.

Expected behavior

Deploy happens with no error.

Desktop (please complete the following information):

  • OS: Linux
  • Version
# lsb_release -a
No LSB modules are available.
Distributor ID: Linuxmint
Description:    Linux Mint 20.3
Release:        20.3
Codename:       una

Additional context

No.

@inliquid
Copy link
Author

If I manually change Dockerfile build command to this:

<...>
RUN go build -buildvcs=false -o /usr/local/bin/hello-world
<...>

It proceeds, but then I have another error:

 x  Error building service 'hello-world': failed to do request: Head "https://okteto.dev/v2/go-hello-world/blobs/sha256:a739c67a76c3ff201aa979efc9c5deb081a75f5b98390ee176315cb0cb582aa9": dialing okteto.dev:443 with direct connection: resolving host okteto.dev: lookup okteto.dev: no such host

@rberrelleza rberrelleza transferred this issue from okteto/okteto May 26, 2023
@rberrelleza
Copy link
Member

Thanks for reporting the issue @inliquid ! I updated the sample to use go 1.19, can you see if you can reproduce the issue? (I couldn't from my side)

@jLopezbarb
Copy link

Hi @inliquid, I'm seeing that you are running your example with a vanilla cluster (a cluster without okteto chart installed). Can you check if it's still happening if you run it in Okteto cloud?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants