Replies: 2 comments
-
If you have two network namespaces (that's what See #108.
Why don't use a .local? |
Beta Was this translation helpful? Give feedback.
-
I did wonder whether the network would become a problem after solving the PATH issue but I didn't want to get ahead of myself. I tried running with
And the error log:
So I've created a new profile for when working with devcontainers called
And changed the firejail command to: firejail --profile=code-devcon --quiet code --folder-uri "vscode-remote://ssh-remote+{hostname}/{remote_dir}" And we are back to the PATH error from the original post. Would using .local file extensions change functionality at all. I am open to using it either way if its the standard. |
Beta Was this translation helpful? Give feedback.
-
I've got vscode running in a sandbox with the following profile
${HOME}/.config/firejail/code.profile
fu_code
is a bridge network running on 10.105.50.0/24.code-extended.profile
Tunnelling through github works fine, but it seems strange for me to send and receive data through a remote location when the container is running on the same host so I would prefer to both connect to an ssh server bound to localhost (
127.0.0.1:2222
) by the container and attach to the running container (not at the same time obviously, but I would like both options available).What do I need to add to my profiles to enable the vscode remotes functionality to work?
The commands used to run vscode and attach or ssh to the containers are :
firejail --quiet code --folder-uri "vscode-remote://ssh-remote+{hostname}/{remote_dir}"
or
firejail --quiet code --folder-uri "vscode-remote://attached-container+$(printf {container_id} | xxd -p)/{remote_dir}"
The
${HOME}/.ssh/config
file is as allows:The
$HOME/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/imageConfigs/localhost%2f{image_name}%3alatest.json
file for attaching is as follows:The podman container image is as follows:
The container is started with the following commands:
podman create \ --name {container_name} \ --ulimit nofile=102400:102400 \ --network bridge \ --publish 127.0.0.1:2222:22 \ --tty \ localhost/{image_name} podman start "{container_name}"
Everything works as expected when I run without firejail. SSH works as expected when
--noprofile
is used but attaching does not. Nothing works when--noprofile
is omitted.SSH when
--noprofile
is omitted shows an error dialog with the message:The error log is:
Attach in both cases shows an error dialog with the message:
The error log is
When I click "More Actions", then "Choose Container" another error dialog appears:
And the following is appended to the error log
Beta Was this translation helpful? Give feedback.
All reactions