Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

is not posible to build docker ejabberd ecs on MacOS ?

Abierto
#124 4 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
docker, elixir, erlang, go, shell

Línea de trabajo

The failure occurs in Dockerfile line 19 during mix deps.get, after the git checkout; start by reviewing build.sh and comparing the docker build --platform linux/amd64 invocation on macOS with the successful Ubuntu build. Check the docker.io/ejabberd/mix image and the reported Elixir, Mix, and Hex versions. Done means build.sh completes and produces ejabberd/ecs:25.03 on macOS.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

hi

i tried to build ecs on my Mac

i wrote

sudo ./build.sh 25.03

this is my build.sh

#!/bin/sh

current=$(date +%y.%m)
version=${1:-$current}

docker build \
    --build-arg VERSION=$version \
    --build-arg VCS_REF=`git rev-parse --short HEAD` \
    --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
    -t ejabberd/ecs:$version --platform linux/amd64  .

[ "$version" = "latest" ] || docker tag ejabberd/ecs:$version ejabberd/ecs:latest

i got this error message

11:50:23.723 [notice] Application hex exited: exited in: Hex.Application.start(:normal, [])
10.95     ** (EXIT) an exception was raised:
10.95         ** (MatchError) no match of right hand side value: 105
10.95             (elixir 1.15.7) src/elixir_def.erl:134: :elixir_def.store_definition/3
10.95             (mix 1.15.7) Mix.RemoteConverger.behaviour_info/1
10.95             (kernel 9.2) application_master.erl:293: :application_master.start_it_old/4
10.97 
10.97 11:50:23.939 [notice] Application inets exited: :stopped
10.98 
10.98 11:50:23.949 [notice] Application ssl exited: :stopped
10.98 
10.98 11:50:23.949 [notice] Application public_key exited: :stopped
10.98 
10.98 11:50:23.949 [notice] Application asn1 exited: :stopped
10.99 
10.99 11:50:23.950 [notice] Application crypto exited: :stopped
11.00 Could not start Hex. Try fetching a new version with "mix local.hex" or uninstalling it with "mix archive.uninstall hex.ez"
11.01 ** (MatchError) no match of right hand side value: {:error, {:hex, {:bad_return, {{Hex.Application, :start, [:normal, []]}, {:EXIT, {{:badmatch, 105}, [{:elixir_def, :store_definition, 3, [file: ~c"src/elixir_def.erl", line: 134]}, {Mix.RemoteConverger, :behaviour_info, 1, []}, {:application_master, :start_it_old, 4, [file: ~c"application_master.erl", line: 293]}]}}}}}}
11.01     (hex 2.1.1) lib/hex.ex:5: Hex.start/0
11.01     (mix 1.15.7) lib/mix/hex.ex:60: Mix.Hex.start/0
11.01     (mix 1.15.7) lib/mix/dep/loader.ex:189: Mix.Dep.Loader.with_scm_and_app/5
11.01     (mix 1.15.7) lib/mix/dep/loader.ex:141: Mix.Dep.Loader.to_dep/4
11.01     (elixir 1.15.7) lib/enum.ex:1693: Enum."-map/2-lists^map/1-1-"/2
11.01     (mix 1.15.7) lib/mix/dep/loader.ex:364: Mix.Dep.Loader.mix_children/3
11.01     (mix 1.15.7) lib/mix/dep/loader.ex:18: Mix.Dep.Loader.children/1
11.01     (mix 1.15.7) lib/mix/dep/converger.ex:97: Mix.Dep.Converger.all/4
------

 4 warnings found (use docker --debug to expand):
 - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 125)
 - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 126)
 - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 127)
 - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 128)
Dockerfile:19
--------------------
  18 |     COPY rel/*exs rel/
  19 | >>> RUN git checkout ${VERSION/latest/HEAD} \
  20 | >>>     \
  21 | >>>     && if [[ "$VERSION" =~ ^[0-9]+\.[0-9]+$ ]]; then \
  22 | >>>         echo '{vsn, "'"$VERSION.0"'"}.' >> vars.config; \
  23 | >>>     else \
  24 | >>>         echo '{vsn, "0.0.0"}.' >> vars.config; \
  25 | >>>     fi \
  26 | >>>     \
  27 | >>>     && mix deps.get \
  28 | >>>     && (cd deps/eimp; ./configure)
  29 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c git checkout ${VERSION/latest/HEAD}         && if [[ \"$VERSION\" =~ ^[0-9]+\\.[0-9]+$ ]]; then         echo '{vsn, \"'\"$VERSION.0\"'\"}.' >> vars.config;     else         echo '{vsn, \"0.0.0\"}.' >> vars.config;     fi         && mix deps.get     && (cd deps/eimp; ./configure)" did not complete successfully: exit code: 1
Error response from daemon: No such image: ejabberd/ecs:25.03

but when i do the same on linux ubuntu i can build ecs successfully

so my question is if building ecs on Mac is not possible?

this is my Dockerfile

FROM docker.io/golang:1.22-alpine AS api
RUN go install -v \
    github.com/processone/ejabberd-api/cmd/ejabberd@latest \
    && mv bin/ejabberd bin/ejabberdapi

FROM docker.io/ejabberd/mix AS builder
ARG VERSION
ENV VERSION=${VERSION:-latest} \
    MIX_ENV=prod
LABEL maintainer="ProcessOne <[email protected]>" \
    product="Ejabberd Community Server builder"

# Get ejabberd sources, dependencies, configuration
RUN git clone https://github.com/processone/ejabberd.git
WORKDIR /ejabberd
COPY vars.config .
COPY config.exs config/
COPY rel/*exs rel/
RUN git checkout ${VERSION/latest/HEAD} \
    \
    && if [[ "$VERSION" =~ ^[0-9]+\.[0-9]+$ ]]; then \
        echo '{vsn, "'"$VERSION.0"'"}.' >> vars.config; \
    else \
        echo '{vsn, "0.0.0"}.' >> vars.config; \
    fi \
    \
    && mix deps.get \
    && (cd deps/eimp; ./configure)

# Compile
RUN MIX_ENV=prod mix release

# Prepare runtime environment
RUN mkdir runtime \
    && tar -C runtime -zxf _build/prod/ejabberd-*.tar.gz \
    && cd runtime \
    && cp releases/*/start.boot bin \
    && cp releases/*/start_clean.boot bin \
    && echo 'beam_lib:strip_files(filelib:wildcard("lib/*/ebin/*beam")), init:stop().' | erl >/dev/null \
    && mv erts*/bin/* bin \
    && EJABBERD_VERSION=`(cd releases; ls -1 -d *.*.*)` \
    && rm -rf releases erts* bin/*src bin/dialyzer bin/typer etc \
    && rm bin/ejabberd \
    && mkdir lib/ejabberd-$EJABBERD_VERSION/priv/bin \
    && cp /usr/lib/elixir/bin/* bin/ \
    && sed -i 's|ERL_EXEC="erl"|ERL_EXEC="/home/ejabberd/bin/erl"|' bin/elixir \
    && cp /ejabberd/tools/captcha*sh bin/ \
    && cp -r /ejabberd/sql lib/ejabberd-*/priv

# Runtime container
FROM docker.io/alpine:3.19
ARG VERSION
ARG VCS_REF
ARG BUILD_DATE
ENV TERM=xterm \
    LC_ALL=C.UTF-8 \
    LANG=en_US.UTF-8 \
    LANGUAGE=en_US.UTF-8 \
    REPLACE_OS_VARS=true \
    HOME=/home/ejabberd \
    PATH="$PATH:/home/ejabberd/bin" \
    VERSION=${VERSION:-latest}
LABEL maintainer="ProcessOne <[email protected]>" \
    product="Ejabberd Community Server Official Docker Image" \
    version=$VERSION \
    org.label-schema.vcs-ref=$VCS_REF \
    org.label-schema.vcs-url="https://github.com/processone/docker-ejabberd" \
    org.label-schema.build-date=$BUILD_DATE \
    org.label-schema.name="Ejabberd Community Server Official Docker Image" \
    org.label-schema.description="Robust, Scalable and Extensible Realtime Server using XMPP, MQTT and SIP" \
    org.label-schema.url="https://www.ejabberd.im/" \
    org.label-schema.vendor="ProcessOne" \
    org.label-schema.version=$VERSION \
    org.label-schema.schema-version="1.0"

# Create directory structure and user for ejabberd
RUN addgroup ejabberd -g 9000 \
    && adduser -s /bin/sh -D -G ejabberd ejabberd -u 9000 \
    && mkdir -p /home/ejabberd/conf /home/ejabberd/database /home/ejabberd/logs /home/ejabberd/upload \
    && chown -R ejabberd:ejabberd /home/ejabberd \
    && ln -fs /home/ejabberd /opt/ejabberd \
    && ln -fs /home/ejabberd /opt/ejabberd-$VERSION

# Install required dependencies
RUN apk upgrade --update-cache --no-progress \
    && apk add \
    expat \
    freetds \
    gd \
    jpeg \
    libgd \
    libpng \
    libstdc++ \
    libwebp \
    ncurses-libs \
    openssl \
    sqlite \
    sqlite-libs \
    tini \
    unixodbc \
    yaml \
    zlib \
    && ln -fs /usr/lib/libtdsodbc.so.0 /usr/lib/libtdsodbc.so \
    && rm -rf /var/cache/apk/*

# Install ejabberd

WORKDIR $HOME
COPY --from=builder /ejabberd/runtime .
COPY bin/* bin/
COPY --from=api /go/bin/ejabberdapi bin/ejabberdapi
RUN chmod 755 bin/ejabberdctl bin/ejabberdapi bin/erl bin/captcha*.sh \
    && mkdir -p /home/ejabberd/sql \
    && cp /home/ejabberd/lib/ejabberd-*/priv/sql/* /home/ejabberd/database/ \
    && cp /home/ejabberd/lib/ejabberd-*/priv/sql/* /home/ejabberd/sql/
COPY --chown=ejabberd:ejabberd conf conf/
ADD --chown=ejabberd:ejabberd https://download.process-one.net/cacert.pem conf/cacert.pem

# Setup runtime environment
.............more configurations .......................
Lenguaje dominante
Shell
Estrellas
101
Forks
77
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de processone/docker-ejabberd

Todos los issues de processone/docker-ejabberd

Issues similares

Más issues de Shell/Bash

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.