Clarified phrasing on gcc image, and made example more clear

This commit is contained in:
Moghedrin 2014-08-20 14:06:33 -06:00
parent dedb0abaab
commit 3441ab84c0
2 changed files with 6 additions and 6 deletions

View File

@ -7,13 +7,13 @@ The GNU Compiler Collection (GCC) is a compiler system produced by the GNU Proje
## Start a gcc instance running your app
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.
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 something along the lines of the following will compile and run your project.
FROM gcc
ADD . /usr/src/myapp
WORKDIR /usr/src/myapp
RUN gcc -o myapp myapp.c
CMD ["./myapp"]
RUN gcc -o executable main.c
CMD ["./executable"]
Then run the commands to build and run the docker image.

View File

@ -7,13 +7,13 @@ The GNU Compiler Collection (GCC) is a compiler system produced by the GNU Proje
## Start a gcc instance running your app
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.
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 something along the lines of the following will compile and run your project.
FROM gcc
ADD . /usr/src/myapp
WORKDIR /usr/src/myapp
RUN gcc -o myapp myapp.c
CMD ["./myapp"]
RUN gcc -o executable main.c
CMD ["./executable"]
Then run the commands to build and run the docker image.