Skip to content

Commit

Permalink
Better docker builds
Browse files Browse the repository at this point in the history
  • Loading branch information
bruceadams committed Jan 17, 2019
1 parent 133a801 commit 0d3d25e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 14 deletions.
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,6 +1,6 @@
[package]
name = "yj"
version = "0.7.8"
version = "0.7.9"
authors = ["Bruce Adams <[email protected]>"]

categories = ["command-line-utilities"]
Expand Down
9 changes: 2 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
FROM bruceadams/rustup-musl as build
FROM scratch

COPY --chown=rust:rust . /home/rust
RUN cargo build --release --target x86_64-unknown-linux-musl

FROM scratch as yj

COPY --from=build /home/rust/target/x86_64-unknown-linux-musl/release/yj /
ADD https://github.com/bruceadams/yj/releases/download/$SOURCE_BRANCH/yj.linux /yj

ENTRYPOINT [ "/yj" ]
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Simple command line tool to convert a YAML input file into a JSON output file.

```bash
$ yj --help
yj 0.7.8
yj 0.7.9
Bruce Adams <[email protected]>
Read YAML, write JSON

Expand All @@ -19,14 +19,21 @@ USAGE:
FLAGS:
-c, --compact Use compact formatting for the JSON output.
-h, --help Prints help information
-j, --json Parse the input as JSON. For most use cases, this option makes no difference. Valid JSON is valid
YAML, so JSON input will (should?) parse correctly even when being handled with the YAML parser.
Use this option when you want failure (instead of weird results) when the input is invalid JSON.
-j, --json Parse the input as JSON. For most use
cases, this option makes no difference.
Valid JSON is valid YAML, so JSON input
will (should?) parse correctly even when
being handled with the YAML parser. Use
this option when you want failure (instead
of weird results) when the input is invalid
JSON.
-V, --version Prints version information
-y, --yaml Format the output as YAML instead of JSON.

OPTIONS:
-o, --output <output> Output file name for the JSON. Defaults to stdout.
-o, --output <output>
Output file name for the JSON. Defaults to stdout.


ARGS:
<input> Input YAML file name. Defaults to stdin.
Expand Down

0 comments on commit 0d3d25e

Please sign in to comment.