Closed Clovel closed 4 years ago
Hello @Clovel
This is a misconfiguration LinuxKit side only, no?
Hello @ulrich. It does seem so for the "code" part. Yet merging this functionality in the default kernel used by Docker for Mac is up to the Docker community. And the issue I have comes from using Docker for Mac, hence why I submitted an issue here.
OK, so the feature is already enabled in LinuxKit and it is not available in docker desktop. Is it that? I don't think the CAN support is fully operational in LinuxKit or I have wrong?
Sorry the need of explanations, but I am lost in your two PR in LinuxKit. One was merged and the second one is open again.
No, it is not yet included. I submitted a PR over at linuxkit : https://github.com/linuxkit/linuxkit/pull/3486.
The one that is merged only affect one sub product (an example ou something like that) of the linuxkit project and is not mine.
Mine changes the main kernel configurations.
I am currently trying to make this work, but am having difficulties. I post my progress and my issues over at https://github.com/linuxkit/linuxkit/pull/3486.
I am under the impression that I am not testing this correctly.
So, when the feature will be fully include in LinuxKit so Docker Desktop will support it.
So, when the feature will be fully include in LinuxKit so Docker Desktop will support it.
I think so.
@Clovel are you waiting for LinuxKit to approve your changes or still working out a solution?
Hi @Willcampbellmelb. As my last comment on https://github.com/linuxkit/linuxkit/pull/3486 states, I can’t even build the kernel with the appropriate build steps. I got no answer to my plea for help, so I guess I’m stuck.
I reported my steps, platform and results to either this issue or (mainly) the PR linked in this comment.
Issues go stale after 90 days of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
comment.
Stale issues will be closed after an additional 30 days of inactivity.
Prevent issues from auto-closing with an /lifecycle frozen
comment.
If this issue is safe to close now please do so.
Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle stale
This issue is LinuxKit related, but the associated LinuxKit issue has not yet been closed. This issue can be either closed or set to pending.
Closed issues are locked after 30 days of inactivity. This helps our team focus on active issues.
If you have found a problem that seems similar to this, please open a new issue.
Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle locked
Description
We cannot use SocketCAN's VirtualCAN bus (
vcan
) on a Linux Docker container w/ Docker for Mac.Rationale
One of the many advantages of Docker for macOS is to be able to test Linux related code and features without requiring the need of a full fledged VM (Parallels, VMWare, Virtual Box) and having a lightweight Linux running while we can develop our projects.
One feature I would like to have on my Mac is SocketCAN. As it or a alternative is sadly unavailable for macOS, I would like to test my programs with VirtualCAN (
vcan
).The Linux Kernel used by Docker for Mac - LinuxKit if I understand correctly - is not compiled with the CAN related configuration flags. This should be addressed.
Expected behavior
Linux Kernel (LinuxKit) should have the following configuration flags for a (near) full CAN protocol support :
For a more streamlined and lightweight approach, maybe this could suffice :
Actual behavior
Modules are not available. The following setup commands are not possible :
Information
Steps to reproduce the behavior
Dockerfile
:Update package manager ------------------------
RUN apk update RUN apk upgrade
Update/install packages -----------------------
RUN apk add --no-cache \ linux-headers \ dumb-init \ musl \ bash \ ca-certificates \ git \ wget \ curl \ tar \ unzip \ coreutils \ gcc \ gdb \ cmake \ make \ pkg-config \ doxygen \ graphviz \ openssh \ net-tools \ vim \ nano \ python3 \ python3-pip
RUN apt install -y can-utils
Install pip3 packages
RUN pip3 install --no-cache --upgrade pip setuptools wheel && \ if [[ ! -e /usr/bin/pip ]]; then \ ln -s pip3 /usr/bin/pip; \ fi RUN pip3 install --no-cache canopen ``
vcan
kernel moduleAction
I will submit a PR to the LinuxKit repository to try and have this feature merged. EDIT : I submitted the PR : linuxkit/linuxkit#3486. I am currently trying to test this on macOS, but I am having some difficulties.
Side notes
This issue seems to have been under discussion over at the LinuxKit repository :
I saw others were having similar difficulties with the SCTP protocol kernel module. I believe a fix was merged in LinuxKit.
3016 : Enable SCTP protocol as a default kernel config