diff --git a/examples/C-HelloWorld/C-HelloWorld.c b/examples/C-HelloWorld/C-HelloWorld.c new file mode 100644 index 00000000..afb12f4b --- /dev/null +++ b/examples/C-HelloWorld/C-HelloWorld.c @@ -0,0 +1,6 @@ +#include + +int main(int argc, char **argv) { + printf("Hello World!!! I am running from Docker Container !!! Whoorrraaaayyyy :) \n"); + return 0; +} diff --git a/examples/C-HelloWorld/Dockerfile b/examples/C-HelloWorld/Dockerfile new file mode 100644 index 00000000..96a44a11 --- /dev/null +++ b/examples/C-HelloWorld/Dockerfile @@ -0,0 +1,17 @@ +FROM ubuntu:latest +FROM gcc:latest + +# Set the working directory in the image +WORKDIR /HelloWorld + +# Copy the files from the host file system to the image file system +COPY . /HelloWorld + +# Install the necessary packages +RUN apt-get update && apt-get install -y gcc + +# Compile C Hello World Application +RUN gcc -o HelloWorld C-HelloWorld.c + +# Run a command to start the application +CMD ["./HelloWorld"]