Coder Social home page Coder Social logo

i386 image faild about docker-go-mingw HOT 4 CLOSED

boy-hack avatar boy-hack commented on May 18, 2024
i386 image faild

from docker-go-mingw.

Comments (4)

boy-hack avatar boy-hack commented on May 18, 2024 1

Thank you, the new version solves my problem very well

from docker-go-mingw.

boy-hack avatar boy-hack commented on May 18, 2024

It seems that this image can only be used under 32-bit. If I want to use 32-bit compilation under x64, what should I do?

from docker-go-mingw.

x1unix avatar x1unix commented on May 18, 2024

@boy-hack that image can be used under 64-bit (I built it on 64-bit machine). This image is based on docker's official golang image for i386 architecture - https://hub.docker.com/r/i386/golang.

i386 instruction set is well supported by Intel chips and 32-bit binaries can be run on x86_64.

What king of mac are you using? (macOS version and model)
Can you try to run it?

docker run --rm -it --platform linux/386 i386/golang sh

I tried to run this on MacBook Pro mid 2015 with macOS Big Sur and unable to reproduce your issue:

image

from docker-go-mingw.

x1unix avatar x1unix commented on May 18, 2024

@boy-hack I changed approach a bit. Now it's a single image as it was before but based on Debian Bullseye which provides Mingw toolchain for both amd64 and i386.

Use GOARCH=386 variable to build a binary for 32-bit. Also, please re-pull x1unix/go-mingw image.

docker run --rm -it -e GOARCH=386 -v /YourPackageSrc:/go/work \
    -w /go/work \
    x1unix/go-mingw go build .

from docker-go-mingw.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.