Skip to content

Commit

Permalink
A few doc updates and such.
Browse files Browse the repository at this point in the history
  • Loading branch information
thedodd committed Dec 10, 2018
1 parent e6a92dd commit 8a54a06
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 20 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
changelog
=========

## 0.2
Support for all Dockerfile instructions have been added.

### 0.2.1
An update to the crate's docs.

## 0.1
The initial release.

### 0.1.1
An update to the crate's docs.
15 changes: 15 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
contributing
============

### publishing releases
- Ensure the README has been updated to reflect accurate examples and installation version.
- Ensure the Cargo.toml version has been updated.
- Ensure docs are updated and rendering as needed.

### development
Running all tests for this system is pretty straightforward.

- cargo test --all-targets
- cargo +nightly test --doc --all-features

To visually check the built docs: `cargo +nightly doc --all-features --open`.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "dockerfile"
description = "A Rust library for dynamically generating Dockerfiles."
version = "0.2.0"
version = "0.2.1"

authors = ["Anthony Dodd <[email protected]>"]
categories = ["api-bindings", "config", "data-structures", "development-tools"]
Expand Down
36 changes: 18 additions & 18 deletions src/instructions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::{
/// The `ADD` instruction copies new files, directories or remote file URLs from `<src>` and adds
/// them to the filesystem of the image at the path `<dest>`.
///
/// See the docs at https://docs.docker.com/engine/reference/builder/#add
/// [See the docs here](https://docs.docker.com/engine/reference/builder/#add).
pub struct Add(Cow<'static, str>);

impl Add {
Expand All @@ -25,7 +25,7 @@ impl fmt::Display for Add {
/// The `ARG` instruction defines a variable that users can pass at build-time to the builder with
/// the `docker build` command using the `--build-arg <varname>=<value>` flag.
///
/// See the docs at https://docs.docker.com/engine/reference/builder/#arg
/// [See the docs here](https://docs.docker.com/engine/reference/builder/#arg).
pub struct Arg(Cow<'static, str>);

impl Arg {
Expand All @@ -42,7 +42,7 @@ impl fmt::Display for Arg {

/// The main purpose of a `CMD` is to provide defaults for an executing container.
///
/// See the docs at https://docs.docker.com/engine/reference/builder/#cmd
/// [See the docs here](https://docs.docker.com/engine/reference/builder/#cmd).
pub struct Cmd(Cow<'static, str>);

impl Cmd {
Expand All @@ -60,7 +60,7 @@ impl fmt::Display for Cmd {
/// The `COPY` instruction copies new files or directories from `<src>` and adds them to the
/// filesystem of the container at the path `<dest>`.
///
/// See the docs at https://docs.docker.com/engine/reference/builder/#copy
/// [See the docs here](https://docs.docker.com/engine/reference/builder/#copy).
pub struct Copy(Cow<'static, str>);

impl Copy {
Expand All @@ -78,7 +78,7 @@ impl fmt::Display for Copy {
/// Parser directives are optional, and affect the way in which subsequent lines in a `Dockerfile`
/// are handled.
///
/// See the docs at https://docs.docker.com/engine/reference/builder/#parser-directives
/// [See the docs here](https://docs.docker.com/engine/reference/builder/#parser-directives).
pub struct Directive(Cow<'static, str>);

impl Directive {
Expand All @@ -95,7 +95,7 @@ impl fmt::Display for Directive {

/// An `ENTRYPOINT` allows you to configure a container that will run as an executable.
///
/// See the docs at https://docs.docker.com/engine/reference/builder/#entrypoint
/// [See the docs here](https://docs.docker.com/engine/reference/builder/#entrypoint).
pub struct Entrypoint(Cow<'static, str>);

impl Entrypoint {
Expand All @@ -112,7 +112,7 @@ impl fmt::Display for Entrypoint {

/// The `ENV` instruction sets the environment variable `<key>` to the value `<value>`.
///
/// See the docs at https://docs.docker.com/engine/reference/builder/#env
/// [See the docs here](https://docs.docker.com/engine/reference/builder/#env).
pub struct Env(Cow<'static, str>);

impl Env {
Expand All @@ -130,7 +130,7 @@ impl fmt::Display for Env {
/// The `EXPOSE` instruction informs Docker that the container listens on the specified network
/// ports at runtime.
///
/// See the docs at https://docs.docker.com/engine/reference/builder/#expose
/// [See the docs here](https://docs.docker.com/engine/reference/builder/#expose).
pub struct Expose(Cow<'static, str>);

impl Expose {
Expand All @@ -148,7 +148,7 @@ impl fmt::Display for Expose {
/// The `FROM` instruction initializes a new build stage and sets the base image for subsequent
/// instructions.
///
/// See the docs at https://docs.docker.com/engine/reference/builder/#from
/// [See the docs here](https://docs.docker.com/engine/reference/builder/#from).
pub struct From(Cow<'static, str>);

impl From {
Expand All @@ -166,7 +166,7 @@ impl fmt::Display for From {
/// The `HEALTHCHECK` instruction tells Docker how to test a container to check that it is still
/// working.
///
/// See the docs at https://docs.docker.com/engine/reference/builder/#healthcheck
/// [See the docs here](https://docs.docker.com/engine/reference/builder/#healthcheck).
pub struct Healthcheck(Cow<'static, str>);

impl Healthcheck {
Expand All @@ -183,7 +183,7 @@ impl fmt::Display for Healthcheck {

/// The `LABEL` instruction adds metadata to an image.
///
/// See the docs at https://docs.docker.com/engine/reference/builder/#label
/// [See the docs here](https://docs.docker.com/engine/reference/builder/#label).
pub struct Label(Cow<'static, str>);

impl Label {
Expand All @@ -203,7 +203,7 @@ impl fmt::Display for Label {
/// the context of the downstream build, as if it had been inserted immediately after the `FROM`
/// instruction in the downstream `Dockerfile`.
///
/// See the docs at https://docs.docker.com/engine/reference/builder/#onbuild
/// [See the docs here](https://docs.docker.com/engine/reference/builder/#onbuild).
pub struct Onbuild(Cow<'static, str>);

impl Onbuild {
Expand All @@ -221,7 +221,7 @@ impl fmt::Display for Onbuild {
/// The `RUN` instruction will execute any commands in a new layer on top of the current image and
/// commit the results.
///
/// See the docs at https://docs.docker.com/engine/reference/builder/#run
/// [See the docs here](https://docs.docker.com/engine/reference/builder/#run).
pub struct Run(Cow<'static, str>);

impl Run {
Expand All @@ -239,7 +239,7 @@ impl fmt::Display for Run {
/// The `SHELL` instruction allows the default shell used for the shell form of commands to be
/// overridden.
///
/// See the docs at https://docs.docker.com/engine/reference/builder/#shell
/// [See the docs here](https://docs.docker.com/engine/reference/builder/#shell).
pub struct Shell(Cow<'static, str>);

impl Shell {
Expand All @@ -257,7 +257,7 @@ impl fmt::Display for Shell {
/// The `STOPSIGNAL` instruction sets the system call signal that will be sent to the container
/// to exit.
///
/// See the docs at https://docs.docker.com/engine/reference/builder/#stopsignal
/// [See the docs here](https://docs.docker.com/engine/reference/builder/#stopsignal).
pub struct Stopsignal(Cow<'static, str>);

impl Stopsignal {
Expand All @@ -276,7 +276,7 @@ impl fmt::Display for Stopsignal {
/// use when running the image and for any `RUN`, `CMD` and `ENTRYPOINT` instructions that follow
/// it in the `Dockerfile`.
///
/// See the docs at https://docs.docker.com/engine/reference/builder/#user
/// [See the docs here](https://docs.docker.com/engine/reference/builder/#user).
pub struct User(Cow<'static, str>);

impl User {
Expand All @@ -294,7 +294,7 @@ impl fmt::Display for User {
/// The `VOLUME` instruction creates a mount point with the specified name and marks it as holding
/// externally mounted volumes from native host or other containers.
///
/// See the docs at https://docs.docker.com/engine/reference/builder/#volume
/// [See the docs here](https://docs.docker.com/engine/reference/builder/#volume).
pub struct Volume(Cow<'static, str>);

impl Volume {
Expand All @@ -312,7 +312,7 @@ impl fmt::Display for Volume {
/// The `WORKDIR` instruction sets the working directory for any `RUN`, `CMD`, `ENTRYPOINT`,
/// `COPY` and `ADD` instructions that follow it in the `Dockerfile`.
///
/// See the docs at https://docs.docker.com/engine/reference/builder/#workdir
/// [See the docs here](https://docs.docker.com/engine/reference/builder/#workdir).
pub struct Workdir(Cow<'static, str>);

impl Workdir {
Expand Down

0 comments on commit 8a54a06

Please sign in to comment.