Skip to content

Commit

Permalink
Project: Stop building the 'reduced-disk' images.
Browse files Browse the repository at this point in the history
As the docker containers have some level of compression there is
almost no size difference, so not much point to keep so many
containers around.
  • Loading branch information
carlosperate committed Dec 26, 2023
1 parent f54e904 commit 3b8e056
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 71 deletions.
42 changes: 0 additions & 42 deletions .github/workflows/deploy-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,12 @@ jobs:
run: docker build -t ghcr.io/${{ github.repository_owner }}/qemu-rpi-os-lite:master --build-arg FILE_SUFFIX=autologin-ssh-expanded .
- name: Tag same base image with date
run: docker tag ghcr.io/${{ github.repository_owner }}/qemu-rpi-os-lite:master ghcr.io/${{ github.repository_owner }}/qemu-rpi-os-lite:master-${{ steps.date.outputs.date }}
- name: Build Reduced Disk image (not expanded)
run: docker build -t ghcr.io/${{ github.repository_owner }}/qemu-rpi-os-lite:master-reduced-disk --build-arg FILE_SUFFIX=autologin-ssh .
- name: Build Mu image
run: docker build -t ghcr.io/${{ github.repository_owner }}/qemu-rpi-os-lite:master-mu --build-arg FILE_SUFFIX=mu .
- name: Push all tags to ghcr.io
run: |
docker push ghcr.io/${{ github.repository_owner }}/qemu-rpi-os-lite:master-${{ steps.date.outputs.date }}
docker push ghcr.io/${{ github.repository_owner }}/qemu-rpi-os-lite:master-mu
docker push ghcr.io/${{ github.repository_owner }}/qemu-rpi-os-lite:master-reduced-disk
docker push ghcr.io/${{ github.repository_owner }}/qemu-rpi-os-lite:master
# This check is not valid, will probably delete soon
Expand Down Expand Up @@ -85,45 +82,6 @@ jobs:
ls
test -f my_file.txt && echo "Previously created file exists."
check-ssh-reduced:
name: SSH sample master-expanded tag
needs: deploy
runs-on: ubuntu-latest
services:
rpios:
image: ghcr.io/${{ github.repository_owner }}/qemu-rpi-os-lite:master-reduced-disk
ports:
- 5022:5022
steps:
- name: Give 2m30s for the docker image to start up QEMU and Raspberry Pi OS
run: sleep 150
- name: Executing remote ssh command 1
uses: appleboy/ssh-action@v1.0.0
with:
host: rpios
username: pi
password: raspberry
port: ${{ job.services.rpios.ports[5022] }}
# QEMU might still take some extra time to start up Raspberry Pi OS
timeout: 5m
script: |
uname -a
cat /etc/os-release
touch my_file.txt
df -h
- name: Executing remote ssh command 2 (check state permanence)
uses: appleboy/ssh-action@v1.0.0
with:
host: rpios
username: pi
password: raspberry
port: ${{ job.services.rpios.ports[5022] }}
script: |
uname -a
cat /etc/os-release
ls
test -f my_file.txt && echo "Previously created file exists."
check-ssh-mu:
name: SSH sample master-mu tag
needs: deploy
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,10 @@ jobs:
run: docker build -t ghcr.io/${{ github.repository_owner }}/qemu-rpi-os-lite:buster-legacy-latest --build-arg FILE_SUFFIX=autologin-ssh-expanded .
- name: Tag the base image with the versioned tag
run: docker tag ghcr.io/${{ github.repository_owner }}/qemu-rpi-os-lite:buster-legacy-latest ghcr.io/${{ github.repository_owner }}/qemu-rpi-os-lite:${{ steps.get_version.outputs.VERSION }}
- name: Build Reduced Disk image
run: docker build -t ghcr.io/${{ github.repository_owner }}/qemu-rpi-os-lite:${{ steps.get_version.outputs.VERSION }}-reduced-disk --build-arg FILE_SUFFIX=autologin-ssh .
- name: Build Mu image
run: docker build -t ghcr.io/${{ github.repository_owner }}/qemu-rpi-os-lite:${{ steps.get_version.outputs.VERSION }}-mu --build-arg FILE_SUFFIX=mu .
- name: Push images to ghcr.io
run: |
docker push ghcr.io/${{ github.repository_owner }}/qemu-rpi-os-lite:${{ steps.get_version.outputs.VERSION }}-mu
docker push ghcr.io/${{ github.repository_owner }}/qemu-rpi-os-lite:${{ steps.get_version.outputs.VERSION }}-reduced-disk
docker push ghcr.io/${{ github.repository_owner }}/qemu-rpi-os-lite:${{ steps.get_version.outputs.VERSION }}
docker push ghcr.io/${{ github.repository_owner }}/qemu-rpi-os-lite:buster-legacy-latest
63 changes: 37 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ These Docker images are built on top of the fantastic
[dockerpi](https://github.com/lukechilds/dockerpi) project, all credit for
the hard work goes to them. The main difference in this version is that the
[Raspberry Pi OS Lite image used](https://github.com/carlosperate/rpi-os-custom-image)
has been updated to enable autologin and ssh.
has been updated to enable auto-login, SSH, and expand their filesystem size.

These changes make these images useful for things like running automated
tests on CI, like GitHub Actions.
tests on CI, like within GitHub Actions.

## How to use these images

The main image produced in this repository can be run with this command:

```
docker run -it ghcr.io/carlosperate/qemu-rpi-os-lite:buster-latest
```bash
docker run -it ghcr.io/carlosperate/qemu-rpi-os-lite:bullseye-latest
```

This will drop you into a bash session inside Raspberry Pi OS.
Expand All @@ -50,8 +50,8 @@ This will drop you into a bash session inside Raspberry Pi OS.

You can also launch an image with port forwarding and access it via SSH:

```
docker run -it -p 5022:5022 ghcr.io/carlosperate/qemu-rpi-os-lite:buster-latest
```bash
docker run -it -p 5022:5022 ghcr.io/carlosperate/qemu-rpi-os-lite:bullseye-latest
```

- SSH port: `5022`
Expand All @@ -60,34 +60,39 @@ docker run -it -p 5022:5022 ghcr.io/carlosperate/qemu-rpi-os-lite:buster-latest

## Available Images

The main latest image is `buster-latest`:
There are two main releases right now `buster-legacy-latest` and
'bullseye-latest':

```
ghcr.io/carlosperate/qemu-rpi-os-lite:bullseye-latest
```

```
ghcr.io/carlosperate/qemu-rpi-os-lite:buster-latest
ghcr.io/carlosperate/qemu-rpi-os-lite:buster-legacy-latest
```

There are two additional versions for each release (they do not have a `latest`
tag, so they include the OS release date in the tag name).
Each Pi OS release has it's own tag, including the OS release date in this
format:

1) `reduced-disk` contains a smaller disk size, which might be enough for small
jobs. The difference is that the default image expands the disk by an extra
1GB of space, to reach a total of about ~1.5 GB of free disk.
```
ghcr.io/carlosperate/qemu-rpi-os-lite:buster-yyyy-mm-dd-reduced-disk
```
2) `Mu`, an specialised image with the
[Mu Editor](https://github.com/mu-editor/mu) dependencies pre-installed,
which is used for CI tests:
```
ghcr.io/carlosperate/qemu-rpi-os-lite:buster-yyyy-mm-dd-mu-latest
```
```
ghcr.io/carlosperate/qemu-rpi-os-lite:buster-yyyy-mm-dd-mu
```

There also is an additional tag on each release with the postfix `mu` in the
tag name, which is an specialised image created specifically to contain the
[Mu Editor](https://github.com/mu-editor/mu) dependencies pre-installed,
which is used for CI tests on that project:

```
ghcr.io/carlosperate/qemu-rpi-os-lite:buster-yyyy-mm-dd-mu
```

All images can be found here:
https://github.com/carlosperate/docker-qemu-rpi-os/pkgs/container/qemu-rpi-os-lite

### Releases

Each OS release is tracked and customised edited via this
Each OS release is tracked and customised via the
[Raspberry Pi OS Custom Image](https://github.com/carlosperate/rpi-os-custom-image)
repository, which then hosts the custom images in its
[releases page](https://github.com/carlosperate/rpi-os-custom-image/releases).
Expand All @@ -96,14 +101,20 @@ repository, which then hosts the custom images in its

Older versions of Raspbian/Raspberry Pi OS have been tagged and published:

```
```bash
docker run -it ghcr.io/carlosperate/qemu-rpi-os-lite:jessie-latest
```

```
```bash
docker run -it ghcr.io/carlosperate/qemu-rpi-os-lite:stretch-latest
```

Tags for the older "buster" release, before it was renamed to "buster-legacy":

```bash
docker run -it ghcr.io/carlosperate/qemu-rpi-os-lite:buster-latest
```

## Build and run this docker image from the repository

```
Expand All @@ -114,7 +125,7 @@ git clone https://github.com/carlosperate/docker-qemu-rpi-os.git
cd docker-qemu-rpi-os
```

```
```
docker build -t carlosperate/qemu-rpi-os-lite .
```

Expand Down

0 comments on commit 3b8e056

Please sign in to comment.