Comments (2)
More tests about the problem.
I think I have isolated the problem, it is something about the image platform used by docker-compose.
To test this I have created a Dockerfile.local
without --platform=$BUILDPLATFORM
and GOARCH=$TARGETARCH
part, so something like this
FROM golang:1.19.1-bullseye as stage
ADD . /src
WORKDIR /src
RUN CGO_ENABLED=0 GOOS=linux go build -a -tags netgo -ldflags "-s -w" "github.com/ortuman/jackal/cmd/jackal"
RUN CGO_ENABLED=0 GOOS=linux go build -a -tags netgo -ldflags "-s -w" "github.com/ortuman/jackal/cmd/jackalctl"
RUN chmod +x jackal jackalctl
FROM debian:stable-slim
RUN apt-get update && apt-get install -y ca-certificates
RUN update-ca-certificates
WORKDIR /jackal
COPY --from=stage /src/jackal /jackal
COPY --from=stage /src/jackalctl /jackal
EXPOSE 5222
ENV PATH $PATH:/jackal
CMD ["./jackal"]
and have used this Dockerfile.local
directly into docker-compose
, so with a jackal service definition like this
jackal:
build:
context: ..
dockerfile: dockerfiles/Dockerfile.local
ports:
- 5222:5222
- 15280:15280
environment:
- JACKAL_LOG_STANZAS=on
depends_on:
- etcd
- pgsql
working_dir: /jackal
volumes:
- ../scripts/wait-for-it.sh:/jackal/wait-for-it.sh
- ../config/docker-compose.config.yaml:/jackal/config.yaml
command:
- ./wait-for-it.sh
- pgsql:5432
- --
- ./wait-for-it.sh
- etcd:2379
- --
- ./jackal
then I have executed the command
sudo docker-compose -f dockerfiles/docker-compose.yml up --force-recreate
and wait-for-it.sh
script works as expected
The output:
jackal_1 | wait-for-it.sh: waiting 15 seconds for pgsql:5432
jackal_1 | wait-for-it.sh: pgsql:5432 is available after 0 seconds
jackal_1 | wait-for-it.sh: waiting 15 seconds for etcd:2379
jackal_1 | wait-for-it.sh: etcd:2379 is available after 0 seconds
jackal_1 | level=info ts=2022-10-28T16:55:13.685507956Z caller=jackal.go:190 msg="jackal is starting...
...
...
from jackal.
I have tried to understand better the problem, more details about:
- If I try to change
command
indocker-compose.yml
to run a simple command likeecho
:
command:
- echo
- "Hi Jackal!"
I've got the same error exec format error
- If I try to run directly
jackal
output is ok
command:
- ./jackal
The problem seems specific of the jackal docker image. I've tried to run wait-for-it
using directly the debian:stable-slim
image (the one used by jackal image) and wait-for-it
script works correctly
jackal:
image: debian:stable-slim
depends_on:
- etcd
- pgsql
volumes:
- ../scripts:/scripts
command:
- /scripts/wait-for-it.sh
- pgsql:5432
- --
- echo
- "Hi Jackal!"
Output
jackal_1 | wait-for-it.sh: waiting 15 seconds for pgsql:5432
jackal_1 | wait-for-it.sh: pgsql:5432 is available after 0 seconds
jackal_1 | Hi Jackal!
dockerfiles_jackal_1 exited with code 0
from jackal.
Related Issues (20)
- Add repository.Private cached type
- Add repository.Offline cached type
- Add repository.Last cached type
- Add repository.Capabilities cached type
- Add repository.BlockList cached type
- XEP-0227: Portable Import/Export Format for XMPP-IM Servers
- New maintainer(s) needed HOT 3
- Move into the organization HOT 2
- Refactor storage model to provide other alternatives besides an RDBMS / SQL db HOT 3
- Websocket connection? HOT 2
- no pepper keys defined? HOT 1
- Getting Started: go get won't work any more HOT 4
- Cannot install with go install
- jackalctl will create invalid users HOT 3
- Add support for XEP-0163: Personal Eventing Protocol
- Authentication failure HOT 2
- VoIP HOT 1
- Digging into logger configuration
- ⚠️ Looking for a new maintainer ⚠️ HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jackal.