GithubHelp home page GithubHelp logo

mini-cross's Introduction

mini-cross

mini-cross

Provides user configured development environments.

Configuration

---
base: ubuntu:22.04	#
install:
 - nodejs		#
 - npm
publish:
 - 8080:80		#
 - 8443:443
---
#!/bin/bash

sudo npm install -g mini-cross	#

The configuration file contains two sections: first a YAML frontmatter section followed by an optional shell script. Splitting the configuration into a declarative and an imperative section enables describing common operations with minimal boilerplate while still allowing arbitary actions.

  1. base describes the Docker image to be used as starting point for further setup.
  2. install contains a list of packages to be installed from the distribution's package manager
  3. publish contains a list of <host port>:<container port> declarations describing port forwarding from host to container
  4. A shell script containing arbritrary commands to be executed while creating the container's image

Since mini-cross needs to know how to install packages on a certain distribution, not all Docker images are supported as base images. Current support includes:

CLI

There two ways of invoking mini-cross

  1. The command invocation
  2. The shell invocation

While technically similar, they provide for different use cases. The first allows to run individual commands inside the development environment while remaining attached to the host shell. The second changes the point of view to the inside of the development environment so that multiple commands can be executed while attached to the same container.

Therefore the command invocation is more suitable for scripted usage while the second is crafted toward comfort for interactive use.

Command invocation

mini-cross <options>* <machine> <command>*

When using mini-cross with command invocation, a machine has always to be specified. The machine determines where to look for the mini-cross configuration and allows for multiple configurations in the same project. The special machine _ is the default machine (most useful for shell invocation though).

This command will start the referenced machine and execute the command using the default docker entry point (most likely a bash shell).

When using mini-cross in a CI, it might be benefitial to pass --no-tty as option in order to not require a pty.

Shell invocation

mini-cross [<machine>]

Invoking mini-cross without additional commands is referred to as shell invocation because the development environment will stay attached to the current shell. Multiple commands may now be executed inside the same container, which can be quit using the exit command (assuming the container uses a shell like bash as docker entry point).

Since the shell invocation does not use arguments, the machine name can be omited and _ (the default machine) will be assumed.

mini-cross's People

Contributors

nicolube avatar ooxi avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

si-moon nicolube

mini-cross's Issues

Must ensure locale-gen is installed

While Ubuntu 16.04 ships locale-gen by default, at least Ubuntu 17.04 does not

Status: Downloaded newer image for ubuntu:17.04
 ---> e31f19d079cc
Step 2 : RUN locale-gen en_US.UTF-8
 ---> Running in 9daff42f4ca0
/bin/sh: 1: locale-gen: not found

Cannot install PHP on Ubuntu 18.04

Since mini-cross does not use DEBIAN_FRONTEND=noninteractive the installation of tzdata is blocked by a question to the user which timezone is to be used.

lint ruby code

Since I'm a Ruby Nooby, the source code should be linted at least manually before the initial stable release.

Add documentation

Both the locations and syntax of YAML configuration files should be documented.

Add examples

The repository should include a couple of example configuration files, otherwise it's hard for people to get the YAML configuration file syntax.

A minimal example should be part of the README.md, too.

Test with more base systems

Currently only modern Ubuntu and Fedora base images are supported. We should automatically test for more distributions and versions.

Add teaser

The README.md should contain a teaser, preferable generated by ttygif

Support UDP

Publishing ports should support UDP

publish:
 - 1812:1812/udp

Support for includes

mini-cross configuration files should be able to include other configuration files.

Fix bundler deprecation warnings

[DEPRECATED] `Bundler.with_clean_env` has been deprecated in favor of `Bundler.with_unbundled_env`. If you instead want the environment before bundler was originally loaded, use `Bundler.with_original_env` (called at /mini-cross/dist/Rakefile:42)
[DEPRECATED] The `--path` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set path '../vendor'`, and stop using this flag
[DEPRECATED] The `--without` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set without 'development'`, and stop using this flag

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.