Skip to content

Commit 40813bd

Browse files
committed
Merge pull request #22 from infosiftr/consistency-and-fredlf
Reflow all the language stack `README-content.md` files to 80 columns and incorporate Fred's changes
2 parents d689689 + e2416c1 commit 40813bd

19 files changed

+244
-121
lines changed

README-footer.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,17 @@
44
## Issues
55

66
If you have any problems with, or questions about this image, please contact us
7-
%%MAILING_LIST%% through a [GitHub issue](%%REPO%%/issues) or via the IRC channel
8-
`#docker-library` on [Freenode](https://freenode.net).
7+
%%MAILING_LIST%% through a [GitHub issue](%%REPO%%/issues) or via the IRC
8+
channel `#docker-library` on [Freenode](https://freenode.net).
99

1010
## Contributing
1111

12-
You are invited to contribute new features, fixes, or updates, large or small; we are
13-
always thrilled to receive pull requests, and do our best to process them as fast as
14-
we can.
12+
You are invited to contribute new features, fixes, or updates, large or small;
13+
we are always thrilled to receive pull requests, and do our best to process them
14+
as fast as we can.
1515

16-
Before you start to code, we recommend discussing your plans %%MAILING_LIST%% through a
17-
[GitHub issue](%%REPO%%/issues), especially for more ambitious contributions. This gives
18-
other contributors a chance to point you in the right direction, give you feedback on
19-
your design, and help you find out if someone else is working on the same thing.
16+
Before you start to code, we recommend discussing your plans %%MAILING_LIST%%
17+
through a [GitHub issue](%%REPO%%/issues), especially for more ambitious
18+
contributions. This gives other contributors a chance to point you in the right
19+
direction, give you feedback on your design, and help you find out if someone
20+
else is working on the same thing.

buildpack-deps/README-content.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1-
# What is buildpack-deps?
1+
# What is `buildpack-deps`?
22

3-
`buildpack-deps` is in spirit similar to [Heroku's stack images](https://github.com/heroku/stack-images/blob/master/bin/cedar.sh); it includes a huge number of "development header" packages needed by arbitrary things like Ruby Gems, PyPI modules, etc. This makes it possible to do something like a `bundle install` in an arbitrary application directory without knowing beforehand that it needs `ssl.h` to build one of the modules depended on, for example.
3+
In spirit, `buildpack-deps` is similar to [Heroku's stack
4+
images](https://github.com/heroku/stack-images/blob/master/bin/cedar.sh). It
5+
includes a large number of "development header" packages needed by various
6+
things like Ruby Gems, PyPI modules, etc. For example, `buildpack-deps` would
7+
let you do a `bundle install` in an arbitrary application directory without
8+
knowing beforehand that `ssl.h` is required to build a dependent module.

clojure/README-content.md

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,37 @@
1-
What is Clojure?
1+
# What is Clojure?
22

3-
Clojure is a dialect of the Lisp programming language created by Rich Hickey. Clojure is a general-purpose programming language with an emphasis on functional programming. It runs on the Java Virtual Machine, Common Langauge Runtime, and JavaScript engines. Like other Lisps, Clojure treats code as data and has a macro system.
3+
Clojure is a dialect of the Lisp programming language. It is a general-purpose
4+
programming language with an emphasis on functional programming. It runs on the
5+
Java Virtual Machine, Common Langauge Runtime, and JavaScript engines. Like
6+
other Lisps, Clojure treats code as data and has a macro system.
47

5-
>[wikipedia.org/wiki/Clojure](http://en.wikipedia.org/wiki/Clojure)
8+
> [wikipedia.org/wiki/Clojure](http://en.wikipedia.org/wiki/Clojure)
69
710
# How to use this image
811

9-
## Start a Lein/Clojure instance running in your app.
12+
## Start a Lein/Clojure instance in your app
1013

11-
As the most common way to use Clojure is in conjunction with [lein](http://leiningen.org/), the Clojure image assumes you are doing so. The most straight-forward way of using this image is adding a Dockerfile to an already existing Lein/Clojure project.
14+
Since the most common way to use Clojure is in conjunction with [Leiningen
15+
(`lein`)](http://leiningen.org/), this image assumes that's how you'll be
16+
working. The most straightforward way to use this image is to add a `Dockerfile`
17+
to an existing Leiningen/Clojure project:
1218

1319
FROM clojure
1420
COPY . /usr/src/app
1521
WORKDIR /usr/src/app
1622
CMD ["lein", "run"]
1723

18-
Then run the commands to build and run the image.
24+
Then, run these commands to build and run the image:
1925

2026
docker build -t my-clojure-app .
2127
docker run -it --rm --name my-running-app my-clojure-app
2228

23-
While the above is the most straight-forward example of a Dockerfile, it has several drawbacks. The `lein run` command will download your dependencies, compile the project, and then run it. That's a lot of work being done, and it may not be that you want that done every single time you run the image. We can download the dependencies ahead of time, as well as compile the project, so that when you run your image, the startup time is significantly reduced.
29+
While the above is the most straightforward example of a `Dockerfile`, it does
30+
have some drawbacks. The `lein run` command will download your dependencies,
31+
compile the project, and then run it. That's a lot of work, all of which you may
32+
not want done every time you run the image. To get around this, you can download
33+
the dependencies and compile the project ahead of time. This will significantly
34+
reduce startup time when you run your image.
2435

2536
FROM clojure
2637
RUN mkdir -p /usr/src/app
@@ -31,17 +42,19 @@ While the above is the most straight-forward example of a Dockerfile, it has sev
3142
RUN mv "$(lein uberjar | sed -n 's/^Created \(.*standalone\.jar\)/\1/p')" app-standalone.jar
3243
CMD ["java", "-jar", "app-standalone.jar"]
3344

34-
This Dockerfile will cause the dependencies to be downloaded (and cached so that they are only redownloaded when the dependencies change, rather than everytime the image is built) and compiled into a standalone jar when it is built rather than each time it is run.
45+
Writing the `Dockerfile` this way will download the dependencies (and cache
46+
them, so they are only re-downloaded when the dependencies change) and then
47+
compile them into a standalone jar ahead of time rather than each time the image
48+
is run.
3549

36-
Then build and run the image.
50+
You can then build and run the image as above.
3751

38-
docker build -t my-clojure-app .
39-
docker run -it --rm --name my-running-app my-clojure-app
40-
41-
## Compile your Lein/Clojure project into a jar from within the container.
52+
## Compile your Lein/Clojure project into a jar from within the container
4253

43-
If you have an existing Lein/Clojure project, it's fairly straightforward to compile your project into a jar from a container.
54+
If you have an existing Lein/Clojure project, it's fairly straightforward to
55+
compile your project into a jar from a container:
4456

4557
docker run -it --rm -v "$(pwd)":/usr/src/app -w /usr/src/app clojure lein uberjar
4658

47-
This will build your project into a jar file located in your project's target/uberjar directory for you to use.
59+
This will build your project into a jar file located in your project's
60+
`target/uberjar` directory.

gcc/README-content.md

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,44 @@
1-
# What is gcc?
2-
The GNU Compiler Collection (GCC) is a compiler system produced by the GNU Project supporting various programming languages. GCC is a key component of the GNU toolchain. The Free Software Foundation (FSF) distributes GCC under the GNU General Public License (GNU GPL). GCC has played an important role in the growth of free software, as both a tool and an example.
1+
# What is GCC?
2+
3+
The GNU Compiler Collection (GCC) is a compiler system produced by the GNU
4+
Project that supports various programming languages. GCC is a key component of
5+
the GNU toolchain. The Free Software Foundation (FSF) distributes GCC under the
6+
GNU General Public License (GNU GPL). GCC has played an important role in the
7+
growth of free software, as both a tool and an example.
38

49
> [wikipedia.org/wiki/GNU_Compiler_Collection](https://en.wikipedia.org/wiki/GNU_Compiler_Collection)
510
611
# How to use this image
712

8-
## Start a gcc instance running your app.
13+
## Start a GCC instance running your app
914

10-
For this image, the most straight-forward use is to use a gcc container as both the build environment as well as the runtime environment. In your Dockerfile, you can do something along the lines of the following will compile and run your project.
15+
The most straightforward way to use this image is to use a gcc container as both
16+
the build and runtime environment. In your `Dockerfile`, writing something along
17+
the lines of the following will compile and run your project:
1118

1219
FROM gcc:4.9
1320
COPY . /usr/src/myapp
1421
WORKDIR /usr/src/myapp
1522
RUN gcc -o myapp main.c
1623
CMD ["./myapp"]
1724

18-
Then run the commands to build and run the docker image.
25+
Then, build and run the Docker image:
1926

2027
docker build -t my-gcc-app .
2128
docker run -it --rm --name my-running-app my-gcc-app
2229

23-
## Compile your app inside the docker container.
30+
## Compile your app inside the Docker container
2431

25-
It is not always appropriate to run your app inside a container. In instances where you only want to compile inside the docker instance, you can do something along the lines of the following.
32+
There may be occasions where it is not appropriate to run your app inside a
33+
container. To compile, but not run your app inside the Docker instance, you can
34+
write something like:
2635

2736
docker run --rm -v "$(pwd)":/usr/src/myapp -w /usr/src/myapp gcc:4.9 gcc -o myapp myapp.c
2837

29-
This will add your current directory as a volume to the container, set the working directory to the volume, and run the command `gcc -o myapp myapp.c` which will tell gcc to compile the code in myapp.c and output the executable to myapp. Alternatively, if you have a make file, you can instead run the make command inside your container.
38+
This will add your current directory, as a volume, to the container, set the
39+
working directory to the volume, and run the command `gcc -o myapp myapp.c.`
40+
This tells gcc to compile the code in `myapp.c` and output the executable to
41+
myapp. Alternatively, if you have a `Makefile`, you can instead run the `make`
42+
command inside your container:
3043

3144
docker run --rm -v "$(pwd)":/usr/src/myapp -w /usr/src/myapp gcc:4.9 make

gcc/README-short.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
The GNU Compiler Collection (GCC) is a compiler system produced by the GNU Project supporting various programming languages.
1+
The GNU Compiler Collection (GCC) is a compiler system produced by the GNU Project that supports various programming languages.

golang/README-content.md

Lines changed: 33 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,60 @@
11
# What is Go?
2-
Go, also called golang, is a programming language initially developed at Google in 2007 by Robert Griesemer, Rob Pike, and Ken Thompson. It is a statically-typed language with syntax loosely derived from that of C, adding garbage collection, type safety, some dynamic-typing capabilities, additional built-in types such as variable-length arrays and key-value maps, and a large standard library.
2+
3+
Go (a.k.a., Golang) is a programming language first developed at Google. It is a
4+
statically-typed language with syntax loosely derived from C, but with
5+
additional features such as garbage collection, type safety, some dynamic-typing
6+
capabilities, additional built-in types (e.g., variable-length arrays and
7+
key-value maps), and a large standard library.
38

49
> [wikipedia.org/wiki/Go_(programming_language)](http://en.wikipedia.org/wiki/Go_(programming_language))
510
611
# How to use this image
712

8-
## Start a go instance running in your app.
13+
## Start a Go instance in your app
914

10-
For this image, the most straight-forward use is to use a golang container as both the build environment as well as the runtime environment. In your Dockerfile, you can do something along the lines of the following will compile and run your project.
15+
The most straightforward way to use this image is to use a Go container as both
16+
the build and runtime environment. In your `Dockerfile`, writing something along
17+
the lines of the following will compile and run your project:
1118

12-
FROM golang:1.3-onbuild
19+
FROM golang:1.3.1-onbuild
1320
CMD ["./myapp"]
1421

15-
This image includes multiple `ONBUILD` triggers so that should be all that you need for most applications. The build will `COPY . /usr/src/app`, `RUN go get -d -v`, and `RUN go build -v`.
22+
This image includes multiple `ONBUILD` triggers which should cover most
23+
applications. The build will `COPY . /usr/src/app`, `RUN go get -d -v`, and `RUN
24+
go build -v`.
1625

17-
Then run and build the docker image.
26+
You can then run and build the Docker image:
1827

1928
docker build -t my-golang-app
2029
docker run -it --rm --name my-running-app my-golang-app
2130

22-
## Compile your app inside the docker container.
31+
## Compile your app inside the Docker container
2332

24-
It is not always appropriate to run your app inside a container. In instances where you only want to compile inside the docker instance, you can do something along the lines of the following.
33+
There may be occasions where it is not appropriate to run your app inside a
34+
container. To compile, but not run your app inside the Docker instance, you can
35+
write something like:
2536

26-
docker run --rm -v "$(pwd)":/usr/src/myapp -w /usr/src/myapp golang:1.3 go build -v
37+
docker run --rm -v "$(pwd)":/usr/src/myapp -w /usr/src/myapp golang:1.3.1 go build -v
2738

28-
This will add your current directory as a volume to the container, set the working directory to the volume, and run the command `go build` which will tell go to compile the project in the working directory and output the executable to myapp. Alternatively, if you have a make file, you can instead run the make command inside your container.
39+
This will add your current directory as a volume to the container, set the
40+
working directory to the volume, and run the command `go build` which will tell
41+
go to compile the project in the working directory and output the executable to
42+
`myapp`. Alternatively, if you have a `Makefile`, you can run the `make` command
43+
inside your container.
2944

30-
docker run --rm -v "$(pwd)":/usr/src/myapp -w /usr/src/myapp golang:1.3 make
45+
docker run --rm -v "$(pwd)":/usr/src/myapp -w /usr/src/myapp golang:1.3.1 make
3146

32-
## Cross-compile your app inside the docker container.
47+
## Cross-compile your app inside the Docker container
3348

34-
If you need to compile your application for a platform other than `linux/amd64` (like `windows/386`, for example), the provided `cross` tags can be used to accomplish this with minimal friction:
49+
If you need to compile your application for a platform other than `linux/amd64`
50+
(such as `windows/386`), this can be easily accomplished with the provided
51+
`cross` tags:
3552

36-
docker run --rm -v "$(pwd)":/usr/src/myapp -w /usr/src/myapp -e GOOS=windows -e GOARCH=386 golang:1.3-cross go build -v
53+
docker run --rm -v "$(pwd)":/usr/src/myapp -w /usr/src/myapp -e GOOS=windows -e GOARCH=386 golang:1.3.1-cross go build -v
3754

38-
Alternatively, build for multiple platforms at once:
55+
Alternatively, you can build for multiple platforms at once:
3956

40-
docker run --rm -it -v "$(pwd)":/usr/src/myapp -w /usr/src/myapp golang:1.3-cross bash
57+
docker run --rm -it -v "$(pwd)":/usr/src/myapp -w /usr/src/myapp golang:1.3.1-cross bash
4158
$ for GOOS in darwin linux; do
4259
> for GOARCH in 386 amd64; do
4360
> go build -v -o myapp-$GOOS-$GOARCH

hylang/README-content.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,33 @@
1-
# What is hylang?
1+
# What is Hy?
22

3-
Hy (alternately, Hylang) is a dialect of the Lisp programming language designed to interoperate with Python by translating expressions into Python's abstract syntax tree (AST). Similar to Clojure's mapping of s-expressions onto the JVM, Hy is meant to operate as a transparent Lisp front end to Python's abstract syntax. Hy also allows for Python libraries (include the standard library) to be imported and accessed alongside Hy code with a compilation step, converting the data structure of both into Python's AST.
3+
Hy (a.k.a., Hylang) is a dialect of the Lisp programming language designed to
4+
interoperate with Python by translating expressions into Python's abstract
5+
syntax tree (AST). Similar to Clojure's mapping of s-expressions onto the JVM,
6+
Hy is meant to operate as a transparent Lisp front end to Python's abstract
7+
syntax. Hy also allows for Python libraries (including the standard library) to
8+
be imported and accessed alongside Hy code with a compilation step, converting
9+
the data structure of both into Python's AST.
410

5-
> [hy.readthedocs.org/en/latest/](http://hy.readthedocs.org/en/latest/)
11+
> [wikipedia.org/wiki/Hy](https://en.wikipedia.org/wiki/Hy)
612
713
# How to use this image
814

9-
## Create a `Dockerfile` in your hylang project.
15+
## Create a `Dockerfile` in your Hy project
1016

11-
FROM hylang:0.10.0
17+
FROM hylang:0.10
1218
COPY . /usr/src/myapp
1319
WORKDIR /usr/src/myapp
1420
CMD [ "hy", "./your-daemon-or-script.hy" ]
1521

16-
Then build and run the docker image.
22+
You can then build and run the Docker image:
1723

1824
docker build -t my-hylang-app
1925
docker run -it --rm --name my-running-app my-hylang-app
2026

21-
## Run a single hylang script.
27+
## Run a single Hy script
2228

23-
For many single file projects, it may not be convenient to write a `Dockerfile` for your project. In such cases, you can run a hylang script by using the hylang docker image directly.
29+
For many simple, single file projects, you may find it inconvenient to write a
30+
complete `Dockerfile`. In such cases, you can run a Hy script by using the Hy
31+
Docker image directly:
2432

25-
docker run -it --rm --name my-running-script -v "$(pwd)":/usr/src/myapp -w /usr/src/myapp hylang:0.10.0 hy your-daemon-or-script.hy
33+
docker run -it --rm --name my-running-script -v "$(pwd)":/usr/src/myapp -w /usr/src/myapp hylang:0.10 hy your-daemon-or-script.hy

java/README-content.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,42 @@
11
# What is Java?
22

3-
Java is a concurrent, class-based, object-oriented language specifically designed to have as few implementation dependencies as possible. It is intended to allow application developers to "write once, run anywhere", meaning that code that runs on one platform does not need to be recompiled to run on another.
3+
Java is a concurrent, class-based, object-oriented language specifically
4+
designed to have as few implementation dependencies as possible. It is intended
5+
to allow application developers to "write once, run anywhere", meaning that code
6+
that runs on one platform does not need to be recompiled to run on another.
47

58
Java is a registered trademark of Oracle and/or its affiliates.
69

710
> [wikipedia.org/wiki/Java_(programming_language)](http://en.wikipedia.org/wiki/Java_(programming_language))
811
912
# How to use this image
1013

11-
## Start a java instance running your app
14+
## Start a Java instance in your app
1215

13-
For this image, the most straight-forward use is to use a java container as both the build environment as well as the runtime environment. In your Dockerfile, you can do something along the lines of the following will compile and run your project.
16+
The most straightforward way to use this image is to use a Java container as
17+
both the build and runtime environment. In your `Dockerfile`, writing something
18+
along the lines of the following will compile and run your project:
1419

1520
FROM java:7
1621
COPY . /usr/src/myapp
1722
WORKDIR /usr/src/myapp
1823
RUN javac Main.java
1924
CMD ["java", "Main"]
2025

21-
Then run the commands to build and run the docker image.
26+
You can then run and build the Docker image:
2227

2328
docker build -t my-java-app .
2429
docker run -it --rm --name my-running-app my-java-app
2530

26-
## Compile your app inside the docker container.
31+
## Compile your app inside the Docker container
2732

28-
It is not always appropriate to run your app inside a container. In instances where you only want to compile inside the docker instance, you can do something along the lines of the following.
33+
There may be occasions where it is not appropriate to run your app inside a
34+
container. To compile, but not run your app inside the Docker instance, you can
35+
write something like:
2936

3037
docker run --rm -v "$(pwd)":/usr/src/myapp -w /usr/src/myapp java:7 javac Main.java
3138

32-
This will add your current directory as a volume to the container, set the working directory to the volume, and run the command `javac Main.java` which will tell java to compile the code in Main.java and output the java class file to Main.class. Alternatively, if you have a make file, you can instead run the make command inside your container.
33-
34-
docker run --rm -v "$(pwd)":/usr/src/myapp -w /usr/src/myapp java:7 make
39+
This will add your current directory as a volume to the container, set the
40+
working directory to the volume, and run the command `javac Main.java` which
41+
will tell Java to compile the code in `Main.java` and output the Java class file
42+
to `Main.class`.

0 commit comments

Comments
 (0)