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

Issue with 0.18.4 release image #2104

Closed
lazzurs opened this issue Mar 2, 2022 · 14 comments · Fixed by #2106
Closed

Issue with 0.18.4 release image #2104

lazzurs opened this issue Mar 2, 2022 · 14 comments · Fixed by #2106
Labels
bug Something isn't working docker-multi-platform

Comments

@lazzurs
Copy link
Contributor

lazzurs commented Mar 2, 2022

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Overview of the Issue

The Docker containers since v0.18.4 have a problem with running commands

Reproduction Steps

docker pull ghcr.io/runatlantis/atlantis:dev

or

docker pull ghcr.io/runatlantis/atlantis:v0.18.3

docker run -it ghcr.io/runatlantis/atlantis:v0.18.4 terraform 

Logs

docker run ghcr.io/runatlantis/atlantis:v0.18.4 terraform --version
standard_init_linux.go:228: exec user process caused: no such file or directory
@lazzurs lazzurs added the bug Something isn't working label Mar 2, 2022
@chenrui333
Copy link
Member

chenrui333 commented Mar 2, 2022

yeah, I can reproduce the issue.

@chenrui333 chenrui333 changed the title Issue with latest Docker containers Issue with latest Docker image Mar 2, 2022
@chenrui333 chenrui333 pinned this issue Mar 2, 2022
@chenrui333
Copy link
Member

I could not figure out the root cause, @lazzurs anything in your mind?

@chenrui333
Copy link
Member

Also, I could not reproduce it in my local.

$ docker build -t atlantis:rui .
[+] Building 0.3s (16/16) FINISHED
 => [internal] load build definition from Dockerfile                                    0.0s
 => => transferring dockerfile: 3.26kB                                                  0.0s
 => [internal] load .dockerignore                                                       0.0s
 => => transferring context: 116B                                                       0.0s
 => [internal] load metadata for ghcr.io/runatlantis/atlantis-base:2022.03.02           0.0s
 => [internal] load metadata for docker.io/library/golang:1.17-alpine                   0.0s
 => [base 1/6] FROM ghcr.io/runatlantis/atlantis-base:2022.03.02                        0.0s
 => [internal] load build context                                                       0.2s
 => => transferring context: 3.44MB                                                     0.2s
 => [builder 1/4] FROM docker.io/library/golang:1.17-alpine                             0.0s
 => CACHED [base 2/6] RUN AVAILABLE_TERRAFORM_VERSIONS="0.11.15 0.12.31 0.13.7 0.14.11  0.0s
 => CACHED [base 3/6] RUN AVAILABLE_CONFTEST_VERSIONS="0.30.0" &&     case linux/arm64  0.0s
 => CACHED [base 4/6] RUN ln -s /usr/local/bin/cft/versions/0.30.0/conftest /usr/local  0.0s
 => CACHED [builder 2/4] WORKDIR /app                                                   0.0s
 => CACHED [builder 3/4] COPY . /app                                                    0.0s
 => CACHED [builder 4/4] RUN CGO_ENABLED=0 go build -trimpath -ldflags "-s -w" -v -o a  0.0s
 => CACHED [base 5/6] COPY --from=builder /app/atlantis /usr/local/bin/atlantis         0.0s
 => CACHED [base 6/6] COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh     0.0s
 => exporting to image                                                                  0.0s
 => => exporting layers                                                                 0.0s
 => => writing image sha256:ef42abe446238fca8602485ce17166a8b70f1a261619c6dc1d118dbf1c  0.0s
 => => naming to docker.io/library/atlantis:rui                                         0.0s


$ docker run atlantis:rui terraform --version
Terraform v1.1.6
on linux_arm64

@lazzurs
Copy link
Contributor Author

lazzurs commented Mar 2, 2022

I can reproduce this in my arm local machine. Testing on my amd64 machine now.

20:40 $ docker build .
[+] Building 37.2s (16/16) FINISHED
 => [internal] load build definition from Dockerfile                       0.0s
 => => transferring dockerfile: 37B                                        0.0s
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 34B                                           0.0s
 => [internal] load metadata for ghcr.io/runatlantis/atlantis-base:2022.0  0.0s
 => [internal] load metadata for docker.io/library/golang:1.17-alpine      0.0s
 => [internal] load build context                                          0.5s
 => => transferring context: 3.79MB                                        0.5s
 => [builder 1/4] FROM docker.io/library/golang:1.17-alpine                0.1s
 => [base 1/6] FROM ghcr.io/runatlantis/atlantis-base:2022.03.02           0.1s
 => [base 2/6] RUN AVAILABLE_TERRAFORM_VERSIONS="0.11.15 0.12.31 0.13.7   10.5s
 => [builder 2/4] WORKDIR /app                                             0.0s
 => [builder 3/4] COPY . /app                                              0.1s
 => [builder 4/4] RUN CGO_ENABLED=0 go build -trimpath -ldflags "-s -w"   35.6s
 => [base 3/6] RUN AVAILABLE_CONFTEST_VERSIONS="0.30.0" &&     case linux  2.8s
 => [base 4/6] RUN ln -s /usr/local/bin/cft/versions/0.30.0/conftest /usr  0.4s
 => [base 5/6] COPY --from=builder /app/atlantis /usr/local/bin/atlantis   0.0s
 => [base 6/6] COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint  0.0s
 => exporting to image                                                     0.9s
 => => exporting layers                                                    0.9s
 => => writing image sha256:e4ebb0b0e1fb23b4cdaf8a3b3c2925e5316ce38e2ed74  0.0s
✔ ~/git/github/atlantis [master|✔]
20:41 $ docker run -it e4ebb0b0e1fb23b4cdaf8a3b3c2925e5316ce38e2ed74 terraform
standard_init_linux.go:228: exec user process caused: no such file or directory

I also tried setting the build arg TARGETPLATFORM and that made no difference.

@lazzurs
Copy link
Contributor Author

lazzurs commented Mar 2, 2022

Oh I should say I also pulled the latest :dev that was built from your PR and that still appears to have the same issue.

@chenrui333
Copy link
Member

chenrui333 commented Mar 2, 2022

I can reproduce this in my arm local machine.

Interesting, here is my docker version

$ docker version
Client: Docker Engine - Community
 Version:           20.10.11
 API version:       1.41
 Go version:        go1.17.2
 Git commit:        dea9396e18
 Built:             Wed Nov 17 23:49:46 2021
 OS/Arch:           darwin/arm64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.12
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.16.12
  Git commit:       459d0df
  Built:            Mon Dec 13 11:43:07 2021
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.4.12
  GitCommit:        7b11cfaabd73bb80907dd23182b9347b4245eb5d
 runc:
  Version:          1.0.2
  GitCommit:        v1.0.2-0-g52b36a2
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

@chenrui333
Copy link
Member

side note, the latest atlantis-base image works for me:

$ docker run ghcr.io/runatlantis/atlantis-base:latest git-lfs --version
git-lfs/3.1.2 (GitHub; linux arm64; go 1.17.6)

@lazzurs
Copy link
Contributor Author

lazzurs commented Mar 2, 2022

Yes the base image also works for me on arm64

@chenrui333
Copy link
Member

with docker buildx build i can reproduce the issue in my local as well

@chenrui333
Copy link
Member

The reverts for the base image in terms of the multi-platform setup fixed the docker buildx build issue

@chenrui333
Copy link
Member

I am going to test out the latest dev image before cutting a new release.

@chenrui333
Copy link
Member

Just tested out the latest dev image, it works fine for me now.

$ docker run ghcr.io/runatlantis/atlantis:dev terraform --version
Terraform v1.1.6
on linux_amd64

Your version of Terraform is out of date! The latest version
is 1.1.7. You can update by downloading from https://www.terraform.io/downloads.html

@chenrui333 chenrui333 changed the title Issue with latest Docker image Issue with 0.18.4 release image Mar 3, 2022
@chenrui333
Copy link
Member

Now in the process of releasing 0.18.5, gonna pin this issue in here for another day.

@chenrui333
Copy link
Member

As the issue is resolved, unpin the issue.

@chenrui333 chenrui333 unpinned this issue Mar 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working docker-multi-platform
Projects
None yet
2 participants