-
Notifications
You must be signed in to change notification settings - Fork 178
Description
What
Let's consider how to use one-cmds tools easily for more people.
For now, one-cmds tools only support Ubuntu 18.04 and 20.04(not officially).
So people in other environments can't use our tools unless they upgrade the OS (or install Ubuntu OS).
IMO, in this case, docker can be a good solution.
Docker is an open source containerization platform. It supports developer to provide applications into containers. And docker is already available on a variety of Linux platforms, macOS and Windows 10 through Docker Desktop. So if we provide one-compiler tool using docker, we can support many types of environment at once.
How
Dockerfile
- Based on Ubuntu 18.04 or 20.04
- Install
one-compiler - Set
oneccas entrypoint
This dockerfile generates a docker image for one-compiler on Ubuntu 18.04 or 20.04.
User can run a process in isolated container using this docker image with several onecc parameters.
onecc-docker tool
- Run docker container with
oneccparameters and several docker run params
This onecc-docker tool runs docker container using above docker image. It sets user and group ids the same as those on host PC, mounts /tmp and ${HOME} directory, adds HOME environment, and changes working directory to current directory.
one-compiler-docker package
- files
Dockerfileonecc-dockerfiles
- install
Dockerfileto/usr/share/one/docker/onecc-dockerto/usr/share/one/bin/
- postinst
- Install symbolic link from
/usr/share/one/bin/onecc-dockerto/usr/bin/oneccwith priority 0 using update-alternatives tool
- Install symbolic link from
- prerm
- Remove symbolic link
one-compiler package
- postinst
- Install symbolic link from
/usr/share/one/bin/oneccto/usr/bin/oneccwith priority 1 using update-alternatives tool
(1 is higher priority than 0)
- Install symbolic link from
- prerm
- Remove symbolic link
Todo
- dockerfile apt-source and version management