Nafaa Boutefer
Nafaa Boutefer

Reputation: 2359

mise install fails with timeout in docker build #4517

I have this dockerfile for reproduction

# Dockerfile: docker(1) container build file.

ARG UBUNTU_DIST=24.04
FROM ubuntu:${UBUNTU_DIST}

RUN apt-get update  \
    && apt-get -y --no-install-recommends install  \
        # install any other dependencies you might need
        sudo curl git ca-certificates build-essential \
    && rm -rf /var/lib/apt/lists/*

SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ENV MISE_DATA_DIR="/mise"
ENV MISE_CONFIG_DIR="/mise"
ENV MISE_CACHE_DIR="/mise/cache"
ENV MISE_INSTALL_PATH="/usr/local/bin/mise"
ENV PATH="/mise/shims:$PATH"
# ENV MISE_VERSION="..."

RUN curl https://mise.run | sh

RUN mise install ruby@3

CMD ["/bin/bash"]

When I run docker build . I get a time. It happens with any tool, node, pnpm, and others. It also happens if I have a mise.toml file and I run mise install

$ docker build .
2025/02/24 19:42:37 in: []string{}
2025/02/24 19:42:37 Parsed entitlements: []
[+] Building 18.8s (8/8) FINISHED                                                                                                                                                                                           docker:default
 => [internal] load build definition from Dockerfile                                                                                                                                                                                  0.0s
 => => transferring dockerfile: 645B                                                                                                                                                                                                  0.0s
 => [internal] load metadata for docker.io/library/ubuntu:24.04                                                                                                                                                                       1.4s
 => [auth] library/ubuntu:pull token for registry-1.docker.io                                                                                                                                                                         0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                     0.0s
 => => transferring context: 2B                                                                                                                                                                                                       0.0s
 => [1/4] FROM docker.io/library/ubuntu:24.04@sha256:72297848456d5d37d1262630108ab308d3e9ec7ed1c3286a32fe09856619a782                                                                                                                 0.0s
 => CACHED [2/4] RUN apt-get update      && apt-get -y --no-install-recommends install          sudo curl git ca-certificates build-essential     && rm -rf /var/lib/apt/lists/*                                                      0.0s
 => CACHED [3/4] RUN curl https://mise.run | sh                                                                                                                                                                                       0.0s
 => ERROR [4/4] RUN mise install ruby@3                                                                                                                                                                                              17.0s
------                                                                                                                                                                                                                                     
 > [4/4] RUN mise install ruby@3:                                                                                                                                                                                                          
16.89 mise ERROR timed out                                                                                                                                                                                                                 
16.89 mise ERROR timed out waiting on channel
16.89 mise ERROR Run with --verbose or MISE_VERBOSE=1 for more information
------
Dockerfile:22
--------------------
  20 |     RUN curl https://mise.run | sh
  21 |     
  22 | >>> RUN mise install ruby@3
  23 |     
--------------------
ERROR: failed to solve: process "/bin/bash -o pipefail -c mise install ruby@3" did not complete successfully: exit code: 1
exit status 1

It happens with any of the latest versions of mise (of course I didn't test all the versions :smiley: ) This issue only happens in the docker build, it works pretty well in host terminal.

What could be the issue?

NOTE: I'm starting a discussion because I'm unable to open an issue. I'm getting the message that there is no issue template for this repository.

I tried with Debian, the same issue. I tried with Fedora:39 and it works very well.

Upvotes: 0

Views: 35

Answers (0)

Related Questions