Skip to content
This repository has been archived by the owner on May 31, 2024. It is now read-only.

Problem running the container after build #15

Open
3goats opened this issue Apr 9, 2024 · 5 comments
Open

Problem running the container after build #15

3goats opened this issue Apr 9, 2024 · 5 comments

Comments

@3goats
Copy link

3goats commented Apr 9, 2024

Hi, I'm using your latest Dockerfile and the docker-entrypoint.sh file, however I getting the following error when I then try to run the container.

docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "docker-entrypoint.sh": executable file not found in $PATH: unknown.
ERRO[0000] error waiting for container: context canceled

I need to manually build since you don' currently provide a linux-arm image.

I tested this on OSX too and got the same error.

@3goats
Copy link
Author

3goats commented Apr 9, 2024

Sorry, I realised I should have provided more information here. I downloaded the pre-built binaries to my ARM64 platform and that works fine. Ideally, I need this to be containerised to work alongside some other container apps. I also tried building my own container using the working binaries but that didn't work either. It seems that docker-entrypoint.sh script is doing some magic, that I haven't quite worked out yet.

I'm trying to build the container on my ARM64 platform using the arm64v8/alpine image. I then edited the Dockerfile to use your rqlite-v8.23.1-linux-arm64.tar.gz binary instead of the rqlite-v8.23.1-linux-amd64-musl.tar.gz

Are there any plans to provide arm imaged to the docker rep's ?

@otoolep
Copy link
Member

otoolep commented Apr 10, 2024

Some file is missing from inside your container -- is rqlited present with the executable flag set?

@3goats
Copy link
Author

3goats commented Apr 10, 2024

Yes - I did try adding this to my Docker file.

RUN chmod +x /bin/rqlited
RUN chmod +x /bin/rqlite

Didn't make any difference though.

@3goats
Copy link
Author

3goats commented Apr 10, 2024

Docker build looks good too.

docker build --pull -t rqlite/rqlite:$VERSION .
[+] Building 0.7s (9/9) FINISHED                                                                                                                                                                                                  docker:default
 => [internal] load build definition from Dockerfile                                                                                                                                                                                        0.0s
 => => transferring dockerfile: 725B                                                                                                                                                                                                        0.0s
 => [internal] load metadata for docker.io/library/alpine:latest                                                                                                                                                                            0.4s
 => [internal] load .dockerignore                                                                                                                                                                                                           0.0s
 => => transferring context: 2B                                                                                                                                                                                                             0.0s
 => [1/4] FROM docker.io/library/alpine:latest@sha256:c5b1261d6d3e43071626931fc004f70149baeba2c8ec672bd4f27761f8e1ad6b                                                                                                                      0.0s
 => [internal] load build context                                                                                                                                                                                                           0.0s
 => => transferring context: 42B                                                                                                                                                                                                            0.0s
 => CACHED [2/4] RUN apk update &&     apk --no-cache add curl tar &&     curl -L https://github.com/rqlite/rqlite/releases/download/v8.23.1/rqlite-v8.23.1-linux-arm64.tar.gz -o rqlite-v8.23.1-linux-arm64.tar.gz &&     tar xvfz rqlite  0.0s
 => CACHED [3/4] RUN mkdir -p /rqlite/file                                                                                                                                                                                                  0.0s
 => CACHED [4/4] COPY docker-entrypoint.sh /bin/docker-entrypoint.sh                                                                                                                                                                        0.0s
 => exporting to image                                                                                                                                                                                                                      0.0s
 => => exporting layers                                                                                                                                                                                                                     0.0s
 => => writing image sha256:7eb9a9b06f7e620aca75139cb84b85051546e94c4c4652e9e5c73da3538cecec                                                                                                                                                0.0s
 => => naming to docker.io/rqlite/rqlite:1.2.3

and with chmod

[+] Building 3.8s (11/11) FINISHED                                                                                                                                                                                                docker:default
 => [internal] load build definition from Dockerfile                                                                                                                                                                                        0.0s
 => => transferring dockerfile: 776B                                                                                                                                                                                                        0.0s
 => [internal] load metadata for docker.io/library/alpine:latest                                                                                                                                                                            0.4s
 => [internal] load .dockerignore                                                                                                                                                                                                           0.0s
 => => transferring context: 2B                                                                                                                                                                                                             0.0s
 => [1/6] FROM docker.io/library/alpine:latest@sha256:c5b1261d6d3e43071626931fc004f70149baeba2c8ec672bd4f27761f8e1ad6b                                                                                                                      0.0s
 => [internal] load build context                                                                                                                                                                                                           0.0s
 => => transferring context: 42B                                                                                                                                                                                                            0.0s
 => CACHED [2/6] RUN apk update &&     apk --no-cache add curl tar &&     curl -L https://github.com/rqlite/rqlite/releases/download/v8.23.1/rqlite-v8.23.1-linux-arm64.tar.gz -o rqlite-v8.23.1-linux-arm64.tar.gz &&     tar xvfz rqlite  0.0s
 => CACHED [3/6] RUN mkdir -p /rqlite/file                                                                                                                                                                                                  0.0s
 => [4/6] RUN chmod +x /bin/rqlited                                                                                                                                                                                                         0.8s
 => [5/6] RUN chmod +x /bin/rqlite                                                                                                                                                                                                          0.9s
 => [6/6] COPY docker-entrypoint.sh /bin/docker-entrypoint.sh                                                                                                                                                                               0.1s
 => exporting to image                                                                                                                                                                                                                      1.3s
 => => exporting layers                                                                                                                                                                                                                     1.2s
 => => writing image sha256:b27b69ca259ae282d5d842d31c005d3380bf67d494544510dd824b1d7eb40515                                                                                                                                                0.0s
 => => naming to docker.io/rqlite/rqlite:1.2.3

@otoolep
Copy link
Member

otoolep commented Apr 10, 2024

Not sure, maybe there is some library rqlited is relying on, which is missing from your container. I think that also results in a "not found" error.

Do you have ldd in the image? This is what I see when I download the amd64 image, for example:

~/r $ curl -L https://github.com/rqlite/rqlite/releases/download/v8.23.1/rqlite-v8.23.1-linux-amd64.tar.gz -o rqlite-v8.23.1-linux-amd64.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 13.8M  100 13.8M    0     0  8471k      0  0:00:01  0:00:01 --:--:-- 11.8M
~/r $ tar xvfz rqlite-v8.23.1-linux-amd64.tar.gz
rqlite-v8.23.1-linux-amd64/
rqlite-v8.23.1-linux-amd64/rqlite
rqlite-v8.23.1-linux-amd64/rqlited
rqlite-v8.23.1-linux-amd64/rqbench
~/r $ cd rqlite-v8.23.1-linux-amd64
~/r/rqlite-v8.23.1-linux-amd64 $ ldd rqlited
	not a dynamic executable
~/r/rqlite-v8.23.1-linux-amd64 $ 

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

No branches or pull requests

2 participants