Coder Social home page Coder Social logo

droboports / docker-cross-compiler-go Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 11 KB

Docker container for Drobo cross-compilation with Go cross-compiler

Home Page: https://registry.hub.docker.com/u/droboports/go-compiler/

License: GNU General Public License v2.0

Shell 100.00%

docker-cross-compiler-go's Introduction

docker-cross-compiler-go

WARNING: Ths container has been deprecated in favor of a single all-purpose Drobo cross-compiler environment here: Github or Docker Hub.

Pull the container

This container is available from Docker Hub.

docker pull droboports/go-compiler

Build the container

docker build --tag="droboports/go-compiler" https://github.com/droboports/docker-cross-compiler-go.git

Start a temporary interactive container

docker run --rm -t -i droboports/go-compiler

Build something using a temporary interactive container

From the container prompt:

cd ~/build
export GOPATH=/mnt/DroboFS/Shares/DroboApps/hello-world
cat > hello-world.go << EOF
package main
import "fmt"
func main() {
  fmt.Println("hello world")
}
EOF
go build -o hello-world hello-world.go

This is the resulting hello-world:

$ file hello-world
hello-world: ELF 32-bit LSB  executable, ARM, EABI5 version 1 (SYSV), statically linked, not stripped

Using the container's build command

This container provides a special build command to build projects in git repositories.

The syntax is build project-name or build url.git, where project-name is the name of the DroboPorts project, and url.git is the URL of a git repository.

For DroboPorts projects, the name is the last component of the GitHub URL. For example, to build the project hosted by the repository https://github.com/droboports/busybox, use the name busybox.

To use the build command, first create a folder to host the resulting packages:

mkdir -p ~/dist
chmod a+rw ~/dist

Then start the container using the special build syntax:

docker run --rm --volume ~/dist:/dist droboports/go-compiler build project-name

Once the build is done, ~/dist will contain project-name.tgz. If no tgz was produced, the docker container will start a bash shell.

docker-cross-compiler-go's People

Contributors

ricardopadilha avatar

Watchers

 avatar  avatar

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.