libhal / SJSU-Dev2

Firmware platform written by San Jose State University for building application for embedded systems
Apache License 2.0
42 stars 63 forks source link

Add Docker to SJSU-DEV2 #1427

Closed evanugarte closed 2 years ago

evanugarte commented 3 years ago

How to test this

  1. ensure Docker is installed on your machine

    to avoid using sudo before every Docker command, you can follow the docker docs guide

  2. from the SJSU-DEV2 project folder, run docker build -t sj-dev2 -f docker/Dockerfile.base .

    -t specifies the image name, -f specifies the location of the Dockerfile to build from, the . at the end represents the build context.

  3. After some time, the image should be created with the setup script already have been ran.

    Ensure this is true by running docker images and seeing the following:

    REPOSITORY                               TAG                 IMAGE ID            CREATED            SIZE
    sj-dev2                                latest              4c496b6a2a39        15 minutes ago      5.16GB
  4. With the Remote Containers VS Code extension installed, navigate to the dedicated tab on your VS Code window: image

  5. Right click the container and select Attach in new Window. A new VS Code window should open shortly.

  6. In the new window click the Open Folder button and enter /SJSU-DEV2 in the top middle input: image

  7. The new window should now open the project with a dedicated terminal. image

  8. Run make application on hello world to ensure no errors: image

Issues to address before PR is ready for review

codecov[bot] commented 3 years ago

Codecov Report

Merging #1427 (01e95c9) into master (35dff34) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #1427   +/-   ##
======================================
  Coverage    59.1%   59.1%           
======================================
  Files          94      94           
  Lines        4598    4598           
  Branches      980     980           
======================================
  Hits         2713    2713           
  Misses       1627    1627           
  Partials      258     258           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 35dff34...01e95c9. Read the comment docs.

evanugarte commented 3 years ago

Docker Machine with USB support on Windows/macOS may also help