Git Product home page Git Product logo

42-valgrindcontainer's Introduction

THIS IS FOR INSIDE 42 INSTALL ON MAC'S IN LAB

Valgrind Docker Container for Development in 42

This container is for running Valgrind in the 42 Labs.

Installation Requirements

-------========= FOR INSIDE 42 LABS ONLY =========-------

INSTALLATION

AUTOMATIC INSTALL

Clone Repo to your 42 Lab Machine. Do not rename the repo, as the scripts use the clone name as references... Execute the install script: bash ./install Follow the instruction provided in the install script. When the Managed Software Center opens, be sure to install Docker, then continue with the install. After installation, close the terminal and reopen.

MANUAL INSTALL

Install docker from the Managed Sofware Center

Make a directory in goinfre mkdir -p ~/goinfre/com.docker.docker

Add the above to the bottom of your .zshrc or .bashrc file. This allways creates the directory if it doesn't exist when you move to a different machine in the lab.

Relink the docker containers to use goinfre

rm -rf ~/Library/Containers/com.docker.docker

ln -s ~/goinfre/com.docker.docker ~/Library/Containers/com.docker.docker

Clone this repo into a empty directory on your mac (~/Documents)

Run the Build script:

./build

Using the Container

The start script will automatically share the current directory into the container. cd into your source code directory where you want to compile your program and run valgrind. Type start, you will see a [DOCKER]-> prompt. The prompt indicates that you are in the docker container, from there you can execute valgrind.

To run commands inside the container from another terminal run: ./run <cmd to execute in container> <arguments for command> This will execute the command inside the container and print the results on your mac terminal.

To exit the docker container, type exit, this will take you back to the mac-osx shell prompt.

(MANUAL) Running with the path in bashrc or zshrc

Don't do this is you have already run the install script during the automatic install. If you want to just use the start script or the run script without referencing the directory where this repo is stored, then you can add the path to the scrips in your .bashrc or .zshrc file as follows at the bottom:

PATH=$PATH:/Users/<username>/<Directory where this repo is cloned>

For example: PATH=$PATH:/Users/dfurneau/Documents/Tools/42-ValgrindContainer

(OPTION MANUAL) Running without the path in bashrc or zshrc

To run the container, run the start script from the directory you want to debug from:

cd /<directory_to_use>

~/Documents/<Where this repo is cloned>/start

Running internal shell commands from outside the container

To run commands within the container you can use the run script:

cd /<where this repo is cloned>

./run <cmd to execute in container> <arguments for command>

Enjoy

As always if you have issues or find bug, please do a Pull Request (PR) and provide a solution.

42-valgrindcontainer's People

Contributors

opsec-infosec avatar mistertooh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.