Mon-ius / build-system-ubuntu

A docker for cross-compiling on ubuntu platform.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docker Pulls

Build-system-ubuntu

This docker image aims at providing a utilized development environment out of the box. Different from other images, it was designed to overcome some unknown network environment and let you make good usage of the target machine just like at home.

Usage

There are three different types of container with tags: base, advanced, latest:

  • base only contains very basic setup, so that you can modify a lot based on it.
  • advanced contains ssh, zero-tier network entrance and updated software, you can quickly start by specify $USER and $NETWORK ENV variables.
  • latest contains all features in advanced, besides, it has large pre-installed software and tools, such as ZSH and zsh plugins.

Docker cli

It's recommended to start with advanced, by default the login user would be ubuntu:

docker run \
    --name=build-sys \
    --hostname=build-sys `#optional` \
    -e NETWORK=yournetworkid `#zerotier` \
    -e PUBLIC_KEY=yourpublickey `#optional` \
    --net=host \
    --cap-add=NET_ADMIN \
    --cap-add=SYS_ADMIN \
    --device=/dev/net/tun \
    --restart unless-stopped \
    monius/build-system-ubuntu:advanced -d

Docker-compose

docker-compose.yaml could replace some args in a file to run a container. See docker-compose.yaml. Put essential environment variables in .env, then:

#start
docker-compose -f ./personal/docker-compose.yaml up -d
#stop
docker-compose -f ./personal/docker-compose.yaml down

It's easy to build your own container with ARG such as default login USER, etc:

See Docker-file and Entry-point. For example :

docker build -t build-personal \
    --build-arg USER=monius \
    ./base

Tips

  • Remove all: docker system prune --all

  • Remove containers all: docker rm -f $(docker ps -a -q)

  • Remove images all: docker rmi -f $(docker images -a -q)

Source

https://github.com/Mon-ius/build-system-ubuntu

Reference

About

A docker for cross-compiling on ubuntu platform.

License:Apache License 2.0


Languages

Language:Shell 86.4%Language:Dockerfile 13.6%