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

"exec format error" #7

Open
viperfx opened this issue Feb 21, 2017 · 3 comments
Open

"exec format error" #7

viperfx opened this issue Feb 21, 2017 · 3 comments

Comments

@viperfx
Copy link

viperfx commented Feb 21, 2017

Hi,

I am using OSX and I get the following issue when trying to run the make -C server/envs/dev command

make -C ../..
go generate dmitryfrank.com/geekmarks/...
go build --race -i dmitryfrank.com/geekmarks/server/cmd/geekmarks-server
docker build -t docker.io/dimonomid/geekmarks-server .
Sending build context to Docker daemon 16.69 MB
Step 1/3 : FROM golang:1.7
 ---> 7afbc2b03b9e
Step 2/3 : ADD geekmarks-server /
 ---> Using cache
 ---> 1ab74f6e4e90
Step 3/3 : ENTRYPOINT /geekmarks-server
 ---> Using cache
 ---> df07124cca50
Successfully built df07124cca50
rm geekmarks-server
docker-compose  build && docker-compose  up
postgres uses an image, skipping
geekmarks uses an image, skipping
Starting geekmarks-dev-postgres
Starting geekmarks-dev-main
Attaching to geekmarks-dev-postgres, geekmarks-dev-main
geekmarks-dev-main | standard_init_linux.go:178: exec user process caused "exec format error"
geekmarks-dev-main exited with code 1
geekmarks-dev-postgres | LOG:  database system was shut down at 2017-02-21 02:11:08 UTC
geekmarks-dev-postgres | LOG:  MultiXact member wraparound protections are now enabled
geekmarks-dev-postgres | LOG:  database system is ready to accept connections
geekmarks-dev-postgres | LOG:  autovacuum launcher started

@dimonomid
Copy link
Owner

Hi,

Unfortunately I don't have any Mac machine to test it on, and from what I know, there are some pecularities in how docker works on Mac. Please see this docker issue: moby/moby#26665 does that help in your case?

You can also consider running geekmarks binary directly, without docker (and you'll also need postgresql daemon running), as @mariusrugan explained in his comment to another (unrelated) issue #5 (comment)

@mariusrugan
Copy link

mariusrugan commented Feb 21, 2017

yeah i found the same issue but at that point i was figuring out the correct go/src/ path for the whole thing to actually start building.
i'm looking now but can't find an answer to what is happening right now.

same error
standard_init_linux.go:178: exec user process caused "exec format error"
googling for it leads to:
docker-library/mysql#228

    1. platform incompatibility ? can't be the case
      i'm building with
      go generate dmitryfrank.com/geekmarks/...
      go build dmitryfrank.com/geekmarks/server/cmd/geekmarks-server
    1. issue with Dockerfile entrypoint ?

Cutting now down everything but geekmarks in the make-to-docker up chain; Even with a very flat Dockerfile

FROM golang:1.7
ADD geekmarks-server /geekmarks-server

build with docker build .
run with docker run -i -t #IMAGE_HASH# bash
i get:

root@fcd6040eeee4:/# ./geekmarks-server bash: ./geekmarks-server: cannot execute binary file: Exec format error

maybe @dimonomid you have more experience running it ?

#EDIT#
moby/moby#26665 (comment) running similar command, runs just fine.

docker run --rm -ti golang:latest sh runs fine
docker run --rm -ti golang:1.7 sh runs fine

#EDIT 2#
my fault, i was a bit too optimistic on " platform incompatibility ? can't be the case "
pull request #10 fixes the issue by indicating x-platform compatibility (see server/Makefile)
CGO_ENABLED=0 GOOS=linux GOARCH=amd64
the rest is sugar-coating (waiting for postgres to be up)

@paridhika
Copy link

Hi,
can someone tell me which docker image I need for raspberry pi 3.
linux/arm64, linux/arm/v7, linux/arm/v6

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

No branches or pull requests

4 participants