-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Purpose PR for [this](https://www.notion.so/uworbital/Improve-dev-env-setup-for-level1-challenge-7b494c39e0934b23aeff297c255741bf?pvs=4) # New Changes Dockerfile added, using Ubuntu, GCC and Make. Updated README.md with new instructions. # Testing Able to build container and run it locally. # Outstanding Changes N/a.
- Loading branch information
1 parent
2b3ff96
commit 6df21af
Showing
2 changed files
with
24 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM ubuntu:latest | ||
|
||
WORKDIR /app | ||
|
||
RUN apt-get update && apt-get install -y gcc make |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,29 @@ | ||
# C Programming Challenge - Level 1 | ||
|
||
This mini-challenge is intended to test your knowledge of C programming. There are 13 C programming questions that can be found in the challenge.c file. Your solution to this challenge will be verified automatically on a standard Linux machine once you make a pull request. | ||
This mini-challenge is intended to test your knowledge of C programming. There are 13 C programming questions that can be found in the `challenge.c` file. Your solution to this challenge will be verified automatically on a standard Linux machine once you make a pull request. | ||
|
||
If you'd like to test your solution locally, make sure you have Make and GCC for your system installed. | ||
To test your solutions locally, you can use the provided Dockerfile to build a Docker image that will run the tests for you. | ||
|
||
To test your solution, run: | ||
```sh | ||
If you do not have Docker installed on your machine, you can follow the instructions <a href="https://www.notion.so/uworbital/How-To-Docker">here</a>. | ||
|
||
To build the Docker image, run: | ||
``` | ||
docker build -t fw-onboarding-level1 . | ||
``` | ||
|
||
You can then run the container with: | ||
``` | ||
docker run -it --rm -v $(pwd):/app fw-onboarding-level1 /bin/bash | ||
``` | ||
|
||
This will open a bash shell inside the container. From there, you can begin working on the challenge. You can stay in the container as long as you want, and you can exit the container by typing `exit`. | ||
In order to test your solutions, you'll need to compile the challenge.c file. You can do this by running the following commands in the bash shell: | ||
``` | ||
make clean | ||
make all | ||
./build/challenge # Or ./build/challenge.exe on Windows | ||
./build/challenge | ||
``` | ||
This will use the provided Makefile to compile the `challenge.c` file and run the resulting executable. | ||
|
||
If you've answered all the questions correctly, you'll pass all the test cases. There should be zero build errors/warnings. | ||
|