The Cannery
Experimental | See also: The Platform ∘ containerized-hastec
Cat's Eye Technologies now has Docker images available on Docker Hub for several of its distributions.
Putting a Dockerfile and a build script in each distribution repository felt not-quite-right somehow, so this repository was created to hold all the Dockerfiles, build scripts, and documentation for each Docker image.
In addition -- and this is significant -- there is a set of driver
scripts in the bin
directory of this repository, which run the
executables in these containers almost as if you had the executable
installed locally.
Each driver script will download any image it needs from Docker hub first, if it is not yet present on the system.
So all you need to do is put bin
on your executable search path,
and suddenly you have a myriad of Cat's Eye Technologies' tools and
language interpreters and such at your disposal, right from your
command line (or shell, or Terminal, or whatever you like to call it.)
Caveats
"almost as if you had it installed locally" does have some limitations.
The containerized executable works on the host's file system through a bind mount. The driver script establishes a bind mount from the current working directory of the host, and the container can't see any of the host's filesystem that is outside that directory.
So, for example, you can't tell a compiler to output the generated
executable file to ../built/out.foo
because it can't see ../
.
Also, the Docker daemon always runs as root. The script tells the
container to be run as the current user on the host. This prevents
the files that the executable writes from being owned by root. But
this directive is not total; the Docker daemon still runs as root.
For that reason I would recommend not running the driver scripts
from a directory that contains anything important, such as /
.
Commit History
@0.2
git clone https://git.catseye.tc/The-Cannery/
- Merge pull request #1 from catseye/scripts Chris Pressey (commit: GitHub) 1 year, 11 months ago
- Add link to README. Chris Pressey 1 year, 11 months ago
- Updates to README. Chris Pressey 1 year, 11 months ago
- Merge branch 'master' into scripts Chris Pressey 1 year, 11 months ago
- Update README for sixtypical, reflecting the actual latest version. Chris Pressey 1 year, 11 months ago
- Retain quotes when executing the executable inside the container. Chris Pressey 1 year, 11 months ago
- Update README with info on new approach. Chris Pressey 1 year, 11 months ago
- containerized-hastec lives in its own repository now. Chris Pressey 1 year, 11 months ago
- Allow hastec to be run as a regular user. The Cabal package Chris Pressey 2 years ago
- Collect settings in one place. Chris Pressey 2 years ago