Coder Social home page Coder Social logo

pyveci / racker Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 1.0 257 KB

Racker is an experimental harness tool for provisioning and running operating system containers.

License: GNU Affero General Public License v3.0

Python 100.00%
docker docker-image harness harness-framework machinectl oci oci-image oci-images skopeo systemd systemd-container systemd-nspawn systemd-run test-environment test-harness testing testing-tool umoci

racker's People

Contributors

amotl avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

webclinic017

racker's Issues

Optimize "time-to-shell" for Windows containers

With #4, the Windows subsystem gets actually usable. However, it currently has three speed bumps when looking at optimizing the "time-to-shell" 1.

A. Container image inspection

Before launching the container, we need to inspect its image in order to select which WDM host to use (Windows 2016, 2019, or 2022). On certain container images, we observed this can take up to three seconds when using skopeo inspect.

$ time skopeo --override-os=windows inspect --config --no-tags docker://docker.io/eclipse-temurin:18-jdk > /dev/null

real	0m3.262s
user	0m0.026s
sys	0m0.212s

We need to mitigate that speed bump, for example by caching the output of the skopeo inspect call. It will not be too difficult.

B. Container image adjustments

Currently, docker build is invoked on every invocation. Getting rid if it will save another 0.5 seconds.

C. PowerShell slowness

We are asking the community about any guidance on this matter. Does PowerShell really have such a large invocation overhead when compared to the cmd shell?

With the cmd program, it takes around 1.4 to 2.6 seconds to spawn a shell.

time racker run --rm --platform=windows/amd64 mcr.microsoft.com/windows/servercore:{ltsc2016,ltsc2019,ltsc2022} -- cmd /C exit

The powershell program takes around 3.1 to 4.7 seconds to spawn a shell.

time racker run --rm --platform=windows/amd64 mcr.microsoft.com/windows/servercore:{ltsc2016,ltsc2019,ltsc2022} -- powershell -Command exit

Footnotes

  1. The time needed to launch a container and connect your terminal to a shell inside the container. โ†ฉ

Add `--volume` option

Add feature for bind-mounting a host directory.

It is important for being able to continue editing within your working tree on your workstation, while you will invoke the program(s) within the container, as usual.

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.