Sign inSign up

franchetti/sye

By franchetti

Updated almost 7 years ago

Dockerisation des dépendances de so3 pour les labos de SYE

Image
0

260

franchetti/sye repository overview

docker run -d --name sye -v /dev:/dev --privileged franchetti/sye

Identifiants SSH :

username : root
password : toor

Fonctionne probablement que sur Linux à cause du volume

Dockerfile :

FROM ubuntu:16.04

ENV USER=root

WORKDIR /opt/toolchains

RUN apt-get update \
	&& apt-get upgrade -y \
	&& apt-get install -y git python3 make wget xz-utils gcc-arm-linux-gnueabihf libncurses5 libncurses5-dev libpython2.7 sudo gcc device-tree-compiler u-boot-tools libpulse0 libsdl2-2.0 libpixman-1-0 multiarch-support libglib2.0-0 libpng12-0 openssh-server

RUN wget -qO- https://releases.linaro.org/components/toolchain/binaries/6.4-2018.05/arm-linux-gnueabihf/gcc-linaro-6.4.1-2018.05-x86_64_arm-linux-gnueabihf.tar.xz | tar -xJC /opt/toolchains
	
WORKDIR /home/reds

RUN mkdir /var/run/sshd
RUN echo 'root:toor' | chpasswd
RUN sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config

# SSH login fix. Otherwise user is kicked off after login
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd

ENV NOTVISIBLE "in users profile"
RUN echo "export VISIBLE=now" >> /etc/profile

EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]

Fichier launch.json pouvant être utilisé pour débugguer avec VS Code (nécessite l'extension Native Debug) :

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Debug usr",
            "type": "gdb",
            "request": "attach",
            "executable": "${workspaceRoot}/usr/sh.elf",
            "target": "localhost:1234",
            "cwd": "${workspaceRoot}/usr",
            "gdbpath": "/opt/toolchains/gcc-linaro-6.4.1-2018.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gdb",
            "remote": true,
            "autorun": [
                "break main"
            ]           
        },
        {
            "name": "Debug so3",
            "type": "gdb",
            "request": "attach",
            "executable": "${workspaceRoot}/so3/so3",
            "target": "localhost:1234",
            "cwd": "${workspaceRoot}/so3",
            "gdbpath": "/opt/toolchains/gcc-linaro-6.4.1-2018.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gdb",
            "remote": true,
            "autorun": [
                "break main"
            ]  
        }
    ]
}

Tag summary

Content type

Image

Digest

Size

404.9 MB

Last updated

almost 7 years ago

docker pull franchetti/sye