Giter Site home page Giter Site logo

build-run-container's Introduction

Running commands containerized

Rarely-used commands do not need to be installed in the workstation or laptop operating system. They can be defined as Dockerfiles and built into container images and used only when needed.

New command is added by:

  • Putting sources to a particular subdirectory:
# /usr/local/share/container-sources/svn/Dockerfile
FROM registry.fedoraproject.org/fedora:latest
RUN dnf install -y subversion && dnf clean all
WORKDIR /data
ENTRYPOINT [ "/usr/bin/svn" ]
  • For convenience, make a symlink in $PATH
# ln -s build-run-container-sudo /usr/local/bin/svn
  • Run the command:
$ svn checkout http://svn.apache.org/repos/asf/httpd/httpd/trunk httpd-trunk

Installation

This repository contains build-run-container script which is expected to run as root via sudo. It builds the container image and then executes the command in the container with the identity of the invoking user.

To help with running build-run-container, tiny wrapper build-run-container-sudo which just executes it with sudo is also provided.

So give access to users on the machine to the build-and-run mechanism, sudo needs to be configured, for example with

# /etc/sudoers.d/build-run-container
ALL ALL=(root) NOPASSWD:SETENV: /usr/local/bin/build-run-container

build-run-container's People

Contributors

adelton avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

build-run-container's Issues

Fix readme

Hi, thanx for talk on Devconf. It looks like you have symlinked readme.md. It doesn't work well on github frontend.

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.