All Projects → augustohp → Ship

augustohp / Ship

Licence: mit
Aids you creating a `Dockerfile` by transforming its (interactive shell) history into `RUN` instructions

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to Ship

Elm Live
⚡ A flexible dev server for Elm. Live reload included.
Stars: ✭ 973 (+1846%)
Mutual labels:  developer-tools
Laravel Mail View
Preview Laravel Mailables and notifications in your browser.
Stars: ✭ 41 (-18%)
Mutual labels:  developer-tools
Github Analytics
GitHub Analytics with Keen IO
Stars: ✭ 42 (-16%)
Mutual labels:  developer-tools
Shuttle
Easily create native mobile applications.
Stars: ✭ 36 (-28%)
Mutual labels:  developer-tools
Scm Backup
Makes offline backups of your cloud hosted source code repositories
Stars: ✭ 38 (-24%)
Mutual labels:  developer-tools
8bp
8 bits de poder ( 8 bits of power)
Stars: ✭ 41 (-18%)
Mutual labels:  developer-tools
Developers Arsenal 2017
😎 Curated list of awesome tools and resources for developers
Stars: ✭ 32 (-36%)
Mutual labels:  developer-tools
Shon
A simple tool to convert json or yaml into a shell-compliant data structure.
Stars: ✭ 47 (-6%)
Mutual labels:  developer-tools
Developer Tools And Resources
The Best Tools and Resources for developers
Stars: ✭ 39 (-22%)
Mutual labels:  developer-tools
Kaniko
Build Container Images In Kubernetes
Stars: ✭ 9,464 (+18828%)
Mutual labels:  developer-tools
Magento2 Easy Template Path Hints
Magento 2 Easy Template Path Hints
Stars: ✭ 36 (-28%)
Mutual labels:  developer-tools
Local Development
[Deprecated] Run Hasura locally on your computer
Stars: ✭ 38 (-24%)
Mutual labels:  developer-tools
Newrelic Client Go
New Relic Client for the Go programming language
Stars: ✭ 42 (-16%)
Mutual labels:  developer-tools
Dvc
🦉Data Version Control | Git for Data & Models | ML Experiments Management
Stars: ✭ 9,004 (+17908%)
Mutual labels:  developer-tools
Puphpeteer
A Puppeteer bridge for PHP, supporting the entire API.
Stars: ✭ 1,014 (+1928%)
Mutual labels:  developer-tools
Swagger Ui Cimpress
A swagger-ui fork with an easy to read, responsive three pane view.
Stars: ✭ 32 (-36%)
Mutual labels:  developer-tools
Ferrum
Headless Chrome Ruby API
Stars: ✭ 1,009 (+1918%)
Mutual labels:  developer-tools
Pulse
Dynamic, api-driven stats collector service for realtime stats publishing and historical aggregation with Influxdb.
Stars: ✭ 48 (-4%)
Mutual labels:  developer-tools
Css Semdiff
Semantic diff tool for CSS
Stars: ✭ 43 (-14%)
Mutual labels:  developer-tools
Influx Prompt
An interactive command-line InfluxDB cli with auto completion.
Stars: ✭ 42 (-16%)
Mutual labels:  developer-tools

SHIP: Shell Helper To Initialize (Dockerfiles) in a new Project

Let's create a new image, on an existing repository, to install bash:

host      $ cd <repository path>
host      $ ship alpine:latest
container $ apk add --no-cache bash
container $ exit
Dockerfile written successfully!
host      $ cat Dockerfile
# Generated by https://github.com/augustohp/ship
FROM alpine:latest
LABEL maintainer="Augusto Pascutti <[email protected]>"

RUN apk add --no-cache bash

What happened?

  1. The container specified was executed in iterative mode
  2. bash (prefered) or ash shell are detected and history configured
  3. The current directory was mounted at /home/developer
  4. The history of the container was converted to RUN instructions in the Dockefile
  5. Your Git credentials become LABEL maintainer, if they are available

Supported images are (other images might work if they have bash available):

  • alpine
  • ubuntu/debian
  • fedora

Installation

This is a single-file script, you can rename it freely to anything memorable for you. An easy one-line install is available through sinister:

sh <(curl -sSL https://git.io/fjjvu) --name ship --local --chmod 755 --url https://git.io/fjhO5

The above one-liner will install the script just for the current user. If you want it globally, remove --local option.

You should be able to execute ship now, for example ship --help:

Usage: ship [-o <filename>] [-f] <image>
       ship <-d | --detect-shell> <image>
       ship <-h | --help>
       ship <-v | --version>

Eases the creation of a Dockerfile by transforming the history
into RUN instructions.

Arguments:
  image                    The name of Dockerimage to be executed. 
                           The image must have bash installed.
Options:
  -o | --out <filename>    The name of the Dockerfile to be creared.
                           Default: Dockerfile.
  -f | --force             Re-creates Dockerfile if it
                           already exists.
  -d | --detect-shell      Outputs the shell available in the image.
                           Shells tested: bash ash

Requirements, trying to be minimal, are:

Development

There is a Makefile to automate checks on the script:

Feel free to hack the ship script. It uses sh not bash to run, so try to avoid bashisms. Almost everything inside the script is on a function to be friendly even if you've never done any shell-scripting before.

Please, feel free to report bugs, ideas or feature requests through an issue.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].