1
0
mirror of https://github.com/rancher/os.git synced 2025-09-10 11:11:31 +00:00

More random docs

This commit is contained in:
Darren Shepherd
2021-10-22 11:40:06 -07:00
parent 4e708c8a1b
commit 06fc7fc32e
12 changed files with 608 additions and 36 deletions

42
docs/customizing.md Normal file
View File

@@ -0,0 +1,42 @@
# Custom Images
RancherOS image can be easily remaster using a docker build.
For example, to add `cowsay` to RancherOS you would use the
following Dockerfile
## Docker image
```Dockerfile
FROM rancher/os2:v0.0.1-test01
RUN zypper install -y cowsay
# IMPORTANT: Setup rancheros-release used for versioning/upgrade. The
# values here should reflect the tag of the image being built
ARG IMAGE_REPO=norepo
ARG IMAGE_TAG=latest
RUN echo "IMAGE_REPO=${IMAGE_REPO}" > /usr/lib/rancheros-release && \
echo "IMAGE_TAG=${IMAGE_TAG}" >> /usr/lib/rancheros-release && \
echo "IMAGE=${IMAGE_REPO}:${IMAGE_TAG}" >> /usr/lib/rancheros-release
```
And then the following commands
```bash
docker build --build-arg IMAGE_REPO=myrepo/custom-build \
--build-arg IMAGE_TAG=v1.1.1 \
-t myrepo/custom-build:v1.1.1 .
docker push myrepo/custom-build:v1.1.1
```
## Bootable images
To create bootable images from the docker image you just created
run the below command
```bash
curl -o ros-image-build https://raw.githubusercontent.com/rancher/os2/main/ros-image-build
bash ros-image myrepo/custom-build:v1.1.1 qcow,iso,ami
```
The above command will create an ISO, a qcow image, and publish AMIs. You need not create all
three types and can change to comma seperated list to the types you care for.