Compare commits

..

11 Commits

Author SHA1 Message Date
59f5178cb6 Add RUNNING_IN_DOCKER env variable
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2025-02-11 18:25:21 -08:00
25d24eb8d4 Update busybox-root/README.md
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2024-03-12 21:54:02 +00:00
286cfaea5d Set correct image names
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2024-03-12 14:51:51 -07:00
66dbde0979 Add static-root and busybox-root containers
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2024-03-12 14:50:24 -07:00
57114a0a13 Update LURE in builder image
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2023-10-08 17:37:58 -07:00
d2a7861da9 Update README [skip ci] 2023-09-28 16:46:33 +00:00
0b3613c74e Set the go version tag manually
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2023-09-28 06:26:21 +00:00
0f76c06081 Clarify README
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/manual/woodpecker Pipeline was successful
2023-08-16 13:47:48 -07:00
c980a6a607 Clarify crane README
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2023-08-16 13:02:51 -07:00
66ebc83e3a Add entrypoint to busybox image
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2023-08-16 12:59:30 -07:00
90949b12a5 Add new images to README 2023-08-16 12:58:44 -07:00
15 changed files with 64 additions and 7 deletions

View File

@@ -2,7 +2,7 @@
[![status-badge](https://ci.elara.ws/api/badges/51/status.svg)](https://ci.elara.ws/repos/51)
This repo contains custom docker images that I'm using for my cluster. You can find the containers I build from these in the [Packages](https://gitea.elara.ws/Elara6331/riscv-docker/packages) section of this repo.
This repo contains build scripts for custom docker images that I'm using for my cluster. You can find the containers that are automatically built from these in the [Packages](https://gitea.elara.ws/Elara6331/riscv-docker/packages) section of this repo.
The containers are stored on my gitea instance, so you can pull them like this:
@@ -10,13 +10,17 @@ The containers are stored on my gitea instance, so you can pull them like this:
docker pull gitea.elara.ws/elara6331/golang:latest
```
Read my article [here](https://www.elara.ws/articles/riscv-cluster)!
### Images
- `static`: A base image with just enough files to run static binaries
- `busybox`: A base image with the busybox utilities installed
- `golang`: An alpine-based image with Go installed
- `webserver`: A very simple webserver
- `go-import-redirector`: rsc's [go-import-redirector](https://github.com/rsc/go-import-redirector) project
- `node`: An alpine-based image with NodeJS installed
- `node`: An alpine-based image with NodeJS and npm installed
- `crane`: Google's [crane](https://github.com/google/go-containerregistry/tree/main/cmd/crane) project
### Acknowledgements

View File

@@ -2,6 +2,9 @@ FROM alpine:edge
RUN apk add --no-cache go yq git gcc bash abuild
RUN apk add --no-cache ko --repository=https://dl-cdn.alpinelinux.org/alpine/edge/testing
RUN apk add --no-cache --allow-untrusted apko --repository=https://packages.wolfi.dev/os
RUN wget -O /usr/bin/lure https://api.minio.elara.ws/adl/lure/lure-amd64 && chmod +x /usr/bin/lure
RUN wget -O lure.tar.gz https://gitea.elara.ws/lure/lure/releases/download/v0.1.2/lure-0.1.2-linux-x86_64.tar.gz && \
tar xvf lure.tar.gz && \
install -Dm755 lure /usr/bin/lure && \
rm -r lure scripts
COPY lure.toml /root/.config/lure/lure.toml
COPY login.sh /bin/registry-login

5
busybox-root/README.md Normal file
View File

@@ -0,0 +1,5 @@
# busybox-root
The [busybox-root image](https://gitea.elara.ws/Elara6331/-/packages/container/busybox-root/latest) is a basic image with the busybox utilities installed.
This image runs as root. See [busybox](https://gitea.elara.ws/Elara6331/riscv-docker/src/branch/master/busybox) for a rootless container.

9
busybox-root/apko.yaml Normal file
View File

@@ -0,0 +1,9 @@
include: gitea.elara.ws/elara6331/riscv-docker/static-root/apko.yaml@master
contents:
packages:
- busybox
- ssl_client
entrypoint:
command: /bin/sh

3
busybox-root/build.sh Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/bash
set -e
apko publish --sbom=false apko.yaml gitea.elara.ws/elara6331/busybox-root:latest

View File

@@ -1,3 +1,3 @@
# static
# busybox
The [busybox image](https://gitea.elara.ws/Elara6331/-/packages/container/busybox/latest) is a basic image with the busybox utilities installed.

View File

@@ -4,3 +4,6 @@ contents:
packages:
- busybox
- ssl_client
entrypoint:
command: /bin/sh

View File

@@ -1,3 +1,4 @@
#!/bin/bash
set -e
apko publish --sbom=false apko.yaml gitea.elara.ws/elara6331/busybox:latest

View File

@@ -1,3 +1,3 @@
# crane
The [crane](https://gitea.elara.ws/Elara6331/-/packages/container/crane/latest) image contains Google's [crane](https://github.com/google/go-containerregistry/tree/main/cmd/crane) project.
The [crane](https://gitea.elara.ws/Elara6331/-/packages/container/crane/latest) image contains Google's [crane](https://github.com/google/go-containerregistry/tree/main/cmd/crane) project. It comes with `/bin/sh` unlike Google's official image, so it's useful for programs such as Woodpecker CI, which depend on a shell being available.

View File

@@ -20,5 +20,4 @@ for arch in pkgs/*/; do
abuild-sign "$arch/APKINDEX.tar.gz"
done
version_tag="gitea.elara.ws/elara6331/golang:$(lure info go-bin | yq -r .version | head -1)"
apko publish --sbom=false apko.yaml gitea.elara.ws/elara6331/golang:latest "$version_tag"
apko publish --sbom=false apko.yaml gitea.elara.ws/elara6331/golang:latest gitea.elara.ws/elara6331/golang:1.21.1

7
static-root/README.md Normal file
View File

@@ -0,0 +1,7 @@
# static-root
The [static-root image](https://gitea.elara.ws/Elara6331/-/packages/container/static-root/latest) is a basic image with just enough files to run static binaries. It's meant to be used as a base image and is useless outside of that.
This image will only run static binaries (i.e. Go binaries with `CGO_ENABLED=0`) as it doesn't include musl or glibc
This image runs as root. See [static](https://gitea.elara.ws/Elara6331/riscv-docker/src/branch/master/static) for a rootless container.

16
static-root/apko.yaml Normal file
View File

@@ -0,0 +1,16 @@
contents:
repositories:
- https://dl-cdn.alpinelinux.org/alpine/edge/main
packages:
- alpine-baselayout-data
- alpine-release
- ca-certificates-bundle
- tzdata
environment:
RUNNING_IN_DOCKER: true
archs:
- amd64
- arm64
- riscv64

3
static-root/build.sh Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/bash
set -e
apko publish --sbom=false apko.yaml gitea.elara.ws/elara6331/static-root:latest

View File

@@ -17,6 +17,9 @@ accounts:
gid: 65532
run-as: 65532
environment:
RUNNING_IN_DOCKER: true
archs:
- amd64
- arm64

View File

@@ -1,3 +1,4 @@
#!/bin/bash
set -e
apko publish --sbom=false apko.yaml gitea.elara.ws/elara6331/static:latest