Skip to content

fieu/EpitechDocker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation


EpitechDocker

EpitechDocker

Epitech Docker setup optimized for C/C++ development

school ci


Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. Updating
  5. Contributing
  6. License
  7. Contact

About The Project

I decided to publish my Docker cause the one Epitech/epitest-docker is full of bloated languages and tools like Java, Python, and a bunch of other shit that you probably don't use. Let's be honest, at Epitech you're only writing C and C++.

Getting Started

Prerequisites

You're gonna need a couple things

  • Docker 🐳 (Technical Preview if on an M1 silicon based Mac)
  • A brain 🧠

Installation

  1. Clone the repo
    git clone https://github.com/fieu/EpitechDocker.git ~/docker
  2. Build the Docker image
    cd ~/docker
    # Linux/Intel based Macs
    make
    # M1 silicon based Macs
    make m1

Usage

Temporary Work Environment

Perfect for quick hacking, offline development, and also if you're broke 🙃

The command to launch the container can be annoying to remember, so here are some easy to use aliases you can throw in your ~/.bashrc or ~/.zshrc.

# Launch container
alias fedora='docker run -it --name "epitech-fedora" --rm -v $(pwd):/work --cap-add SYS_PTRACE epitech-fedora'
# Open shell in running container
alias sh-fedora="docker exec -it epitech-fedora /bin/bash"

Note: The launch commands will map your current directory to /work within the container. Good rule of thumb is to run the fedora alias in your project root.

SSH Enabled Container

Good for when you have access to a server and don't want to replace the OS but have a Fedora environment. Can be paired with the Visual Studio Code Remote - SSH extension to provide a full work environment like you are used to in VS Code, though everything is saved and terminal commands are executed in the container.

You can run the container in as a long-term service that will stay alive until you kill the container.

Set the SSH_PASSWORD environment variable and map the SSH server port to enable the SSH server on boot of the container. Example:

docker run -it \
  --name "epitech-fedora" \
  -v "/home/user/work:/work" \
  --cap-add SYS_PTRACE \
  -e SSH_PASSWORD="SuperSecureP@ssword123" \
  -p 2022:22 \
  epitech-fedora

Updating

In order to update, simply pull from upstream and rebuild the image.

cd ~/docker
git pull
# Linux/Intel based Macs
make
# M1 silicon based Macs
make m1

Contributing

Not sure what you would want to contribute, but if you want, be my guest.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.