orange-pi-lite-golang

balenalib/orange-pi-lite-golang Docker Image

该镜像属于balena.io IoT设备基础镜像系列,专为物联网设备优化,适用于balena.io和balenaOS环境,也可在其他Docker环境中使用,提供便捷的包管理和设备动态识别功能。

下载次数: 0状态:社区镜像维护者:balenalib仓库类型:镜像最近更新:3 年前
下载命令
点击查看

This image is part of the https://balena.io/?ref=dockerhub base image series for IoT devices. The image is optimized for use with https://balena.io/?ref=dockerhub and https://www.balena.io/os/?ref=dockerhub, but can be used in any Docker environment running on the appropriate architecture.

.

Some notable features in balenalib base images:

  • Helpful package installer script called install_packages that abstracts away the specifics of the underlying package managers. It will install the named packages with smallest number of dependencies (ignore optional dependencies), clean up the package manager medata and retry if package install fails.

  • Working with dynamically plugged devices: each balenalib base image has a default ENTRYPOINT which is defined as ENTRYPOINT ["/usr/bin/entry.sh"], it checks if the UDEV flag is set to true or not (by adding ENV UDEV=1) and if true, it will start udevd daemon and the relevant device nodes in the container /dev will appear.

For more details, please check the https://www.balena.io/docs/reference/base-images/base-images/#features-overview in our documentation.

https://www.balena.io/docs/reference/base-images/base-images/#run-vs-build?ref=dockerhub

The balenalib images come in many flavors, each designed for a specific use case.

:<version> or :<version>-run

This is the defacto image. The run variant is designed to be a slim and minimal variant with only runtime essentials packaged into it.

:<version>-build

The build variant is a heavier image that includes many of the tools required for building from source. This reduces the number of packages that you will need to manually install in your Dockerfile, thus reducing the overall size of all images on your system.

How to use this image with Balena

This https://www.balena.io/docs/learn/getting-started/orange-pi-lite/go/?ref=dockerhub can help you get started with using this base image with balena, there are also some cool https://www.balena.io/docs/learn/getting-started/orange-pi-lite/go/#example-projects?ref=dockerhub that will give you an idea what can be done with balena.

What is Go?

Go (a.k.a., Golang) is a programming language first developed at Google. It is a statically-typed language with syntax loosely derived from C, but with additional features such as garbage collection, type safety, some dynamic-typing capabilities, additional built-in types (e.g., variable-length arrays and key-value maps), and a large standard library.

***.org/wiki/Go_(programming_language)

Supported versions and respective Dockerfile links :

https://github.com/balena-io-library/base-images/tree/master/balena-base-images/golang/orange-pi-lite/debian/

For more information about this image and its history, please see the https://github.com/balena-io-library/official-images/blob/master/library/orange-pi-lite-debian-golang in the https://github.com/balena-io-library/official-images.

How to use this image

Start a Go instance in your app

The most straightforward way to use this image is to use a Go container as both the build and runtime environment. In your Dockerfile, writing something along the lines of the following will compile and run your project:

dockerfile
FROM balenalib/orange-pi-lite-debian-golang:latest

WORKDIR /go/src/app
COPY . .

RUN go get -d -v ./...
RUN go install -v ./...

CMD ["app"]

You can then build and run the Docker image:

console
$ docker build -t my-golang-app .
$ docker run -it --rm --name my-running-app my-golang-app

Compile your app inside the Docker container

There may be occasions where it is not appropriate to run your app inside a container. To compile, but not run your app inside the Docker instance, you can write something like:

console
$ docker run --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp balenalib/orange-pi-lite-debian-golang:latest go build -v

This will add your current directory as a volume to the container, set the working directory to the volume, and run the command go build which will tell go to compile the project in the working directory and output the executable to myapp.

User Feedback

Issues

If you have any problems with or questions about this image, please contact us through a https://github.com/balena-io-library/base-images/issues.

Contributing

You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can.

Before you start to code, we recommend discussing your plans through a https://github.com/balena-io-library/base-images/issues, especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give you feedback on your design, and help you find out if someone else is working on the same thing.

Documentation

Documentation for this image is stored in the https://www.balena.io/docs/reference/base-images/base-images/#balena-base-images?ref=dockerhub. Check it out for list of all of our base images including many specialised ones for e.g. node, python, go, smaller images, etc.

You can also find more details about new features in balenalib base images in this https://www.balena.io/blog/new-year-new-balena-base-images/?ref=dockerhub

镜像拉取方式

您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表。

轩辕镜像加速拉取命令点我查看更多 orange-pi-lite-golang 镜像标签

docker pull docker.xuanyuan.run/balenalib/orange-pi-lite-golang:<标签>

DockerHub 原生拉取命令

docker pull balenalib/orange-pi-lite-golang:<标签>
专业版 · 高速稳定拉取镜像
50GB 仅 ¥8/年
高速镜像下载在线技术支持99.95% SLA 保障付费会员免广告