-
Notifications
You must be signed in to change notification settings - Fork 17
Creating patch guide
ZCube edited this page Jan 21, 2023
·
4 revisions
Basically, creating a compatible image is reverse engineering. It's not easy to find another guide. Components written in the same language are good references.
First of all, below is how I use it.
- First, find the list of components you need.
- Find a list of components that need to be worked on.
go run main.go list --app=matomo
* [ ] matomo:4.13.1
❌ matomo.4.13.1-1
You only need one matomo component.
- Identify the required language
php
- Check bitnami docker image.
docker run --rm -ti bitnami/matomo /bin/bash -c "ls -al /opt/bitnami"
docker run --rm -ti bitnami/matomo /bin/bash -c "find /opt/bitnami/matomo"
- References other components that use the same language.
wordpress
cat patches/wordpress/6/docker/Dockerfile.from
FROM alpine:3.12.0 as wordpress
COPY --from=bitnami/wordpress:{{{VERSION}}} /opt/bitnami/wordpress/ /opt/bitnami/wordpress/
COPY --from=bitnami/wordpress:{{{VERSION}}} /opt/bitnami/wp-cli/ /opt/bitnami/wp-cli/
cat patches/wordpress/6/docker/Dockerfile.install
COPY --from=wordpress /opt/bitnami/ /opt/bitnami/
- Create a component patch based on the patch found in step 4.
go run main.go makeDirs --app=matomo
vi patches/matomo/4/docker/Dockerfile.from
... something
vi patches/matomo/4/docker/Dockerfile.install
... something
- Testing. 6 on failure
go run main.go generate --app=matomo
go run main.go build --app=matomo
- Complete
I hope this guide is helpful.