• Stars
    star
    3
  • Rank 3,848,222 (Top 78 %)
  • Language
    Crystal
  • License
    MIT License
  • Created almost 8 years ago
  • Updated almost 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Dockerfile Parsing Library written in Crystal

dockerfile.cr

Travis master

Dockerfile parser library, ported from @yurinnick's Ruby library.

Installation

Add this to your application's shard.yml:

dependencies:
  dockerfile:
    github: keplersj/dockerfile.cr

Usage

example.cr

require 'dockerfile'

puts DockerfileParser.load('Dockerfile')

Dockerfile

FROM debian:jessie
MAINTAINER Nikolay Yurin <[email protected]>

RUN apt-get update && \
    apt-get install -y nginx

RUN rm -rf /var/lib/apt/lists/* && \
    chown -R www-data:www-data /var/lib/nginx

VOLUME /var/www/html
WORKDIR /etc/nginx
COPY site-example.conf /etc/nginx/sites-available/site-example.conf
COPY index.html.tmpl /var/www/html/index.html

EXPOSE 80

CMD ["nginx", "-g", "daemon off;"]

output

[
    {command: "FROM",       params: ["debian", "jessie"]},
    {command: "MAINTAINER", params: "Nikolay Yurin <[email protected]>"},
    {command: "RUN",        params: [
                              ["apt-get", "update"],["&"],
                              ["apt-get", "install", "-y", "nginx"]]},
    {command: "RUN",        params: [
                              ["rm", "-rf", "/var/lib/apt/lists/*"],
                              ["&"],
                              ["chown", "-R", "www-data:www-data", "/var/lib/nginx"]]},
    {command: "VOLUME",     params: "/var/www/html"},
    {command: "WORKDIR",    params: "/etc/nginx"},
    {command: "COPY",       params: {src: "site-example.conf",
                                       dst: "/etc/nginx/sites-available/site-example.conf"}},
    {command: "COPY",       params: {src: "index.html.tmpl",
                                       dst: "/var/www/html/index.html"}},
    {command: "EXPOSE",     params: "80"},
    {command: "CMD",        params: ["nginx", "-g", "daemon off;"]}
]

Contributing

  1. Fork it (https://github.com/keplersj/dockerfile.cr/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

  • @yurinnick Nikolay Yurin - creator
  • @keplersj Kepler Sticka-Jones - maintainer, ported to Crystal

More Repositories

1

jest-runner-prettier

Prettier runner for Jest
TypeScript
90
star
2

jest-raw-loader

Jest transformer mimicking webpack-contrib/raw-loader's functionality
JavaScript
34
star
3

jest-runner-stylelint

Stylelint runner for Jest
JavaScript
20
star
4

jest-preset-gatsby

Preset for testing Gatsby sites using Jest.
JavaScript
9
star
5

gatsby-plugin-verify-brave

Gatsby plugin for Brave Rewards Verification
TypeScript
8
star
6

jcrystal

Crystal bindings for the JVM. Macros for interacting with Java easily.
Crystal
6
star
7

BoatCraft

Rails had their turn, now out to the Minecraftian seas.
Scala
6
star
8

jest-runner-remark

Jest runner to run remark-lint
TypeScript
6
star
9

jest-runner-tslint

TSLint runner for Jest
TypeScript
6
star
10

update

One-stop update utility
Crystal
4
star
11

ovit

Work in Progress tool to safely interact with data from TiVo hard drives.
Rust
4
star
12

react-use-webp-support-check

React Hook to determine if WebP is supported in the current environment
TypeScript
4
star
13

atom-test-runner-jest

Atom Test Runner for Jest
TypeScript
4
star
14

singingSiri

Teaching Siri how to sing!
Objective-C
4
star
15

remark-preset-lint-retext-english

remark-lint preset for automated proofreading of English text using retext
JavaScript
4
star
16

language-minecraft-forge-cfg

An Atom grammar for Minecraft Forge Config files.
CoffeeScript
3
star
17

carraway

Tool to simplify creating a Gatsby site
TypeScript
3
star
18

website

My website; part landing page, part blog, part portfolio, and part CV, but entirely me.
TypeScript
2
star
19

gatsby-theme-atom-service

Gatsby theme for websites that curate Atom packages that provide and consume an Atom service
TypeScript
2
star
20

Define

An application for iOS 6 exposing the system dictionary in a convienent application frontend.
Ruby
2
star
21

gatsby-theme-kepler

Gatsby theme for creating a personal landing page, blog, portfolio, and CV
TypeScript
2
star
22

timetable

Service to schedule web hook executions
Rust
2
star
23

jest-serializer-xml

A snapshot serializer for XML strings.
JavaScript
2
star
24

language-mirah

It's about damn time Mirah had a proper grammar.
CoffeeScript
2
star
25

starstuff-style

Opinionated, yet simple, base CSS stylesheet
CSS
1
star
26

cises

A browser extension that incrementally improves on the University of Utah CIS experience.
TypeScript
1
star
27

atom-parser-swift

Atom package which uses Apple SourceKit for Syntax Highlighting, important for Swift.
JavaScript
1
star
28

starstuff-components

Minimalistic Web Components Library
TypeScript
1
star
29

atomico-use-head

Atomico hooks for interacting with the document head
TypeScript
1
star
30

styled-custom-elements

Styled API for Custom Elements
TypeScript
1
star
31

ResidualVM-Core

Allow OpenEmu to harness the power of ResidualVM
Objective-C
1
star
32

gatsby-theme-curiousity

The Gatsby theme that builds the portfolio component of my website
TypeScript
1
star
33

wc-markdown

Web Component for rendering Markdown using Remark
TypeScript
1
star
34

gatsby-plugin-verify-bing

Gatsby plugin for Bing Website Verification
TypeScript
1
star
35

gatsby-theme-sputnik

The Gatsby theme that powers my simpler sites built with MDX
JavaScript
1
star
36

jest-preset-atom

Preset for testing Atom packages with Jest
JavaScript
1
star
37

ScummVM-Core

Allow OpenEmu to harness the power of ScummVM
Objective-C
1
star
38

uri-path-breakdown

Single-function module to break a URI path down to its parts
TypeScript
1
star
39

stylelint-config-starstuff

Shareable Stylelint config for my projects
JavaScript
1
star
40

jest-serializer-react-helmet

Serializer to display React Helmet data in Jest Snapshots
TypeScript
1
star