Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C Hello World program has been added in examples #96

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions examples/C-HelloWorld/C-HelloWorld.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include <stdio.h>

int main(int argc, char **argv) {
printf("Hello World!!! I am running from Docker Container !!! Whoorrraaaayyyy :) \n");
return 0;
}
17 changes: 17 additions & 0 deletions examples/C-HelloWorld/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]