Skip to content

Docker build doesn't work on MacOS #429

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

Closed
ashokkjag opened this issue Jun 21, 2023 · 1 comment
Closed

Docker build doesn't work on MacOS #429

ashokkjag opened this issue Jun 21, 2023 · 1 comment

Comments

@ashokkjag
Copy link
Contributor

The dockerfile simply copies the natively build binary, which doesn't work in case of docker on MacOS.

# stripe-mock > master > make build
go build -mod=vendor -o stripe-mock
# stripe-mock > master > docker build -t "stripe-mock" .
[+] Building 1.3s (8/8) FINISHED
 => [internal] load build definition from Dockerfile                                                                                                                         0.0s
 => => transferring dockerfile: 264B                                                                                                                                         0.0s
 => [internal] load .dockerignore                                                                                                                                            0.0s
 => => transferring context: 97B                                                                                                                                             0.0s
 => [internal] load metadata for docker.io/library/alpine:latest                                                                                                             0.5s
 => [1/3] FROM docker.io/library/alpine:latest@sha256:82d1e9d7ed48a7523bdebc18cf6290bdb97b82302a8a9c27d4fe885949ea94d1                                                       0.0s
 => [internal] load build context                                                                                                                                            0.5s
 => => transferring context: 21.24MB                                                                                                                                         0.5s
 => CACHED [2/3] RUN apk --no-cache add ca-certificates                                                                                                                      0.0s
 => [3/3] COPY stripe-mock /bin/stripe-mock                                                                                                                                  0.1s
 => exporting to image                                                                                                                                                       0.1s
 => => exporting layers                                                                                                                                                      0.0s
 => => writing image sha256:401df59925dbbb7447b73ca87619a63aeda6e36cf9db906ec680f727d8271512                                                                                 0.0s
 => => naming to docker.io/library/stripe-mock                                                                                                                               0.0s
# stripe-mock > master > docker run --rm stripe-mock:latest
exec /bin/stripe-mock: exec format error
@richardm-stripe
Copy link
Contributor

Fixed by #430

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

2 participants