-
Notifications
You must be signed in to change notification settings - Fork 5
Conversation
Nice thanks for the improvements. I will do some testing on this on a couple platforms. |
Me too, I'm outside home now. |
There appear to be some build failures with the images. |
@allenporter now it should be working normally, I tested. This is the final size: $ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
new latest de37fea230f1 10 seconds ago 60.3MB |
rtsp-to-web/Dockerfile
Outdated
RUN chmod +x /app/rtsp-to-web | ||
# Build | ||
ENV GO111MODULE="on" | ||
ENV GIN_MODE="release" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My impression is that this is a runtime variable and not a build time variable, hence why it was at the end and not at the start. move back?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my past experience with Golang, I really don't think so. But moving them back does not hurt much anyway.
@@ -1,14 +1,13 @@ | |||
# https://developers.home-assistant.io/docs/add-ons/configuration#add-on-dockerfile | |||
# https://developers.home-assistant.io/docs/add-ons/configuration/#add-on-extended-build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you help me understand more the motivation behind changing the base image from the example? My impression is this adds extra build labels for the community addons, but this isn't a community add-on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, the new base image has a newer Alpine. That's all I cared about.
Alpine on the regular base image is 3.14, while in this one is 3.15.
I can revert if you prefer, but I thought it would be an enhancement. Image size is very small anyway. Actually I didn't compare both, and I would be surprised if they differ much.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ops, I think now I have a better reasoning to prefer the new one:
❯ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
ghcr.io/home-assistant/amd64-base 3.14 e6325b527bd3 6 hours ago 68.4MB
ghcr.io/hassio-addons/base/amd64 11.0.1 a0e49bd90483 4 weeks ago 25.5MB
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, well, i don't think it is appropriate for to have these community add-on labels since this is not a community add-on project, so I think there needs to be a different solution for that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still don't want these labels, maintainer, etc.
I'll give this a try soon. In order to fix https://github.com/allenporter/stream-addons/issues/29 i'm moving the configuration around to /data so that it can sit in the add-on persistent volume in #31 and pulling in a couple changes from here (e.g. removing redundant lines while i'm updating them). If you have time to review, i'll take it. |
@allenporter I still didn't get my hands on a Raspberry Pi for testing in ARM, but I'm confident that my last change should have fixed it there. Also, I'm using this version of the addon ever since, and it's working very well. |
Thanks for the reminder, i'll give this a try soon. |
Yes, this is working, great!
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks overall for the improvements here. I still have some nitpicky things -- some arguably style things -- that i'd like to still talk through/address.
rtsp-to-web/Dockerfile
Outdated
ARG TEMPIO_VERSION=2021.09.0 | ||
ARG BUILD_ARCH | ||
ARG BUILD_ARCH="amd64" | ||
ARG BUILD_FROM="ghcr.io/hassio-addons/base/${BUILD_ARCH}:11.0.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd either leave this out or make it latest so we don't have something else to keep up to date.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Newer versions can potentially break. Every other community addon also pins the version. This is a very good practice for build reproducibility and traceability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Example:
This is going to break every addon once it gets released.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, i'm for pinning. However, my impression is that we're already pinning this when building the image from automation. This ARG default value is only used when run manually. I almost like it better without a default value so its less clear that its specified somewhere else and this value is never used for the actual published image.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yeah, the default value here is only meant for manual build of the image.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure you want me to remove it? You will have to type in the whole docker build call with two long --build-args every time you just want to build the image. Most of other community addons also does this:
https://github.com/hassio-addons/addon-vscode/blob/main/vscode/Dockerfile#L1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, but the author probably has scripts to update the base image versions. That was also why I suggested latest
here as a compromise since this is just for development. I just don't want to have to maintain this. (The image version in the build script is automatically maintained, but this isn't)
Please let me know what you think. I did some research, and I realized that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we're close
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to make these two changes the merge this
I'd like to do a partial revert of these two changes and merge your PR. Perhaps we can keep discussing after, as i'd like to make bigger changes, but don't want to force you to have to do all the merging yourself. |
rtsp-to-web/Dockerfile
Outdated
|
||
ARG REPO=github.com/deepch/RTSPtoWeb | ||
WORKDIR /build/$REPO | ||
RUN apk add --no-cache git go=~1.17.4-r0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This didn't work, though I didn't look closely as to why exactly:
https://github.com/allenporter/stream-addons/runs/5261769429?check_suite_focus=true
ERROR: unable to select packages:
go-1.16.10-r0:
breaks: world[go~1.17.4-r0]
The command '/bin/ash -o pipefail -c apk add --no-cache git go=~1.17.4-r0' returned a non-zero code: 1
I'd like to revert this.
Comparison (before and after):
Which means that the addon is much quicker to install now, and takes less space.