https://github.com/jwillikers/gnu-arm-embedded-ssh-image
A container image for running the ARM embedded toolchain from an OpenSSH server, built on Fedora
https://github.com/jwillikers/gnu-arm-embedded-ssh-image
buildah c clion cpp fedora gnu-arm-embedded-toolchain openssh
Last synced: about 2 months ago
JSON representation
A container image for running the ARM embedded toolchain from an OpenSSH server, built on Fedora
- Host: GitHub
- URL: https://github.com/jwillikers/gnu-arm-embedded-ssh-image
- Owner: jwillikers
- License: other
- Archived: true
- Created: 2021-06-18T13:35:30.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-08-12T16:56:47.000Z (almost 4 years ago)
- Last Synced: 2025-04-06T21:52:13.044Z (2 months ago)
- Topics: buildah, c, clion, cpp, fedora, gnu-arm-embedded-toolchain, openssh
- Language: Shell
- Homepage: https://quay.io/repository/jwillikers/gnu-arm-embedded-ssh
- Size: 36.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE.adoc
- Code of conduct: CODE_OF_CONDUCT.adoc
Awesome Lists containing this project
README
= GNU Arm Embedded SSH Image
Jordan Williams
:experimental:
:icons: font
ifdef::env-github[]
:tip-caption: :bulb:
:note-caption: :information_source:
:important-caption: :heavy_exclamation_mark:
:caution-caption: :fire:
:warning-caption: :warning:
endif::[]
:Buildah: https://buildah.io/[Buildah]
:CLion: https://www.jetbrains.com/clion/[CLion]
:Fedora: https://getfedora.org/[Fedora]
:Fedora-Silverblue: https://silverblue.fedoraproject.org/[Fedora Silverblue]
:fish: https://fishshell.com/[fish]
:GCC: https://gnu-arm-embedded.gnu.org/[GCC]
:Git: https://git-scm.com/[Git]
:GNU-Arm-Embedded-Toolchain: https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads[GNU Arm Embedded Toolchain]
:OpenSSH: https://www.openssh.com/[OpenSSH]
:Podman: https://podman.io/[Podman]
:pre-commit: https://pre-commit.com/[pre-commit]
:Visual-Studio-Code: https://code.visualstudio.com/[Visual Studio Code]image:https://img.shields.io/github/workflow/status/jwillikers/gnu-arm-embedded-ssh-image/CI/main[GitHub Workflow Status]
image:https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white[pre-commit, link=https://github.com/pre-commit/pre-commit]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.== Synopsis
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:: https://quay.io/repository/jwillikers/gnu-arm-embedded-ssh[quay.io/jwillikers/gnu-arm-embedded-ssh]
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 password `password`.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.== Quick Start
. 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`.[source,sh]
----
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
----[NOTE]
====
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.
+
[source,sh]
----
ssh -p 2222 [email protected]
----. Enter the default password for the user named `user`, which is `password`.
== Build
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.
+
[source,sh]
----
sudo rpm-ostree install fish
----. Reboot to finish the installation.
+
[source,sh]
----
systemctl reboot
----. Clone this repository.
+
[source,sh]
----
git -C ~/Projects clone [email protected]:jwillikers/gnu-arm-embedded-ssh-image.git
----. Install {pre-commit}.
+
[source,sh]
----
pip install pre-commit
----. Change into the project directory.
+
[source,sh]
----
cd ~/Projects/gnu-arm-embedded-ssh-image
----. Install pre-commit's Git hooks.
+
[source,sh]
----
pre-commit install
----. Run the shell script to build the image.
+
[source,sh]
----
buildah unshare ~/Projects/gnu-arm-embedded-ssh-image/build.fish
----. Test the image with the `test.fish` shell script.
+
[source,sh]
----
~/Projects/gnu-arm-embedded-ssh-image/test.fish
----== Learn More
* https://blog.jetbrains.com/clion/2020/01/using-docker-with-clion/[Using Docker with CLion]
* https://code.visualstudio.com/docs/remote/ssh[Visual Studio Code - Remote Development using SSH]== Contributing
Contributions in the form of issues, feedback, and even pull requests are welcome.
Make sure to adhere to the project's link:CODE_OF_CONDUCT.adoc[Code of Conduct].== Open Source Software
This project is built on the hard work of countless open source contributors.
Several of these projects are enumerated below.* https://asciidoctor.org/[Asciidoctor]
* {Buildah}
* {Fedora}
* {GCC}
* {Fedora-Silverblue}
* {fish}
* {Git}
* https://www.linuxfoundation.org/[Linux]
* {OpenSSH}
* {Podman}
* {pre-commit}
* https://www.python.org/[Python]
* https://rouge.jneen.net/[Rouge]
* https://www.ruby-lang.org/en/[Ruby]== Code of Conduct
Refer to the project's link:CODE_OF_CONDUCT.adoc[Code of Conduct] for details.
== License
This repository is licensed under the https://www.gnu.org/licenses/gpl-3.0.html[GPLv3], a copy of which is provided in the link:LICENSE.adoc[license file].
© 2021 Jordan Williams
== Authors
mailto:{email}[{author}]