GithubHelp home page GithubHelp logo

krzysiekbr / alpine2docker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dduportal/alpine2docker

0.0 0.0 0.0 41 KB

A Lightweight Vagrant VM to quickly run docker

Makefile 14.45% Shell 75.93% Smarty 9.62%

alpine2docker's Introduction

alpine2docker Vagrant Box

This repository contains the scripts necessary to create a lightweight Vagrant box for running docker, based on Alpine Linux OS.

If you work solely with Docker, this box lets you keep your Vagrant workflow and work in the most minimal Docker environment possible.

Usage

The box is available on Hashicorp's Atlas, making it very easy to use it:

vagrant init dduportal/alpine2docker
vagrant up
  • Guest OS: Alpine Linux
  • LVM root filesystem for any filesystem growing allocation
  • 1 Gb swap enabled
  • Default to NAT network
  • Default to 2 vCPUs and 4 Gb memory
  • OpenSSH server
  • Bash, curl, sudo, rsync
  • Administrative user alpine (password is the same)
  • Docker Engine
  • Docker Compose
  • Docker Bash Completion
  • NOT in the box:
    • No VirtualBox addition (meaning: no shared filesystem with the host by default, unless using rsync)
    • No USB
    • No Audio

Building the Box

If you want to recreate the box, rather than using the binary, then you can use the scripts and Packer template within this repository to do so in seconds.

Requirements

Building the box

Then run this command to build the box and run the test suite:

make all

You can also run the make targets independently for a quick feedback loop:

  • make box: Only run the packer build
  • make clean-box: Remove any packer final or intermediate artifacts
  • make prepare-test: Copy the latest built box to the test environement
  • make test: Run the test suite using vagrant
  • make clean-test: Clean any test artifacts or VM
  • make clean: Clean everything

Extension point

If you want to tune the behavior to fit your needs, but want to reuse all the build process, here is the workflow for VM customization:

  • Add this repository as a git submodule of your repository
  • Put in the customize folder the content you want to be uploaded to the VM
    • You can overwrite existing content: it is for demo purpose
    • The content will be uploaded inside /var/customize
    • If there is a script run.sh, it will be run during box build time
  • Build the VM with the previous instructions

alpine2docker's People

Contributors

dduportal avatar

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.