A container image for running the GNU Arm Embedded Toolchain toolchain from an OpenSSH server, built on Fedora. Comes complete with CMake, Conan, Ninja, and Clang tools.
This container is meant to be used with IDE’s that support remote development over SSH, such as CLion and {Visual Studio Code}. You might find this workflow particularly helpful if you develop on an immutable base operating system, such as {Fedora Silverblue}.
- Image
- Tags
-
-
latest
-
- Supported architectures
-
-
amd64
(x86_64) -
arm
(armhfp) -
arm64
(aarch64)
-
- Users
-
root
-
The default user inside the container is
root
since the OpenSSH server must be started by the superuser. user
-
A user named
user
is also created with the default passwordpassword
.
- Volumes
-
/etc/ssh
-
Where the container’s own server-side SSH keys reside as well as various configuration files.
/home/user/.ssh
-
The default user’s SSH keys and configuration.
- Cmd
-
["/usr/sbin/sshd", "-D", "-e"]
- Labels
-
io.containers.autoupdate=registry
-
Enables automatic updates when using Podman and the fully-qualified image name.
-
To run the OpenSSH server from this image, run the container using Podman.
Use the
-p
flag to port-forward the SSH port, port 22, from the container to the host. To attach a device such as a serial console, add the--security-opt label=disable
to disable SELinux and pass through the desired device with the--device
flag. The following example forwards port 22 in the container to port 2222 on localhost and allows access to the device/dev/ttyBmpGdb
.podman run \ --rm \ -p 2222:22 \ --security-opt label=disable \ --device /dev/ttyBmpGdb:/dev/ttyBmpGdb \ --volume "$PWD":/home/user/project:Z \ --name gnu-arm-embedded-ssh \ -dt quay.io/jwillikers/gnu-arm-embedded-ssh:latest
ℹ️To access the SSH server from another container, simply run the containers in the same pod. This doesn’t even require port forwarding!
-
The container should then be accessible using SSH from the local machine.
ssh -p 2222 [email protected]
-
Enter the default password for the user named
user
, which ispassword
.
This project uses Buildah and Podman for building and testing the image.
A set of pre-commit checks are readily available to ensure your code is up-to-spec at the time it is committed.
Instructions for setting up a development environment, building the image, and testing the image follow.
These instructions are intended for users of Fedora Silverblue, where the packages buildah
, git
, and podman
are already available.
Moreover, I use the fish shell.
-
Install the fish shell.
sudo rpm-ostree install fish
-
Reboot to finish the installation.
systemctl reboot
-
Clone this repository.
git -C ~/Projects clone [email protected]:jwillikers/gnu-arm-embedded-ssh-image.git
-
Install pre-commit.
pip install pre-commit
-
Change into the project directory.
cd ~/Projects/gnu-arm-embedded-ssh-image
-
Install pre-commit’s Git hooks.
pre-commit install
-
Run the shell script to build the image.
buildah unshare ~/Projects/gnu-arm-embedded-ssh-image/build.fish
-
Test the image with the
test.fish
shell script.~/Projects/gnu-arm-embedded-ssh-image/test.fish
Contributions in the form of issues, feedback, and even pull requests are welcome. Make sure to adhere to the project’s Code of Conduct.
This project is built on the hard work of countless open source contributors. Several of these projects are enumerated below.
Refer to the project’s Code of Conduct for details.
This repository is licensed under the GPLv3, a copy of which is provided in the license file.
© 2021 Jordan Williams