Closed MarcelWaldvogel closed 1 year ago
Same here. v6.0.0 still works fine.
Yes. This was discussed here as well, where you can also read about the rationale behind this:
https://pfalz.social/@maschinenraum/110836182954523189
I appreciate that this isn’t best practice, so I’m keen to discuss alternative ideas. What are everyone’s suggestions?
In the container, you wouldn't have your .git
folder as well, so even if you would add the git executable, you couldn't get the info you want.
A way to avoid all of that would be to set up a build argument adding the version
/commit id
in an environment variable and using those instead of git
.
Example :
Dockerfile
ARG VERSION
ENV VERSION=$VERSION
GitHub action
- name: Build and push
id: docker_build
uses: docker/build-push-action@v4
with:
push: true
build-args: |
VERSION=${{ github.ref_name }}
I have completely reverted this now in v7.0.1. I might revisit this later, but at this time I think that the ability to run FediFetcher from the container, outweighs the benefit from printing the version string during start up.
I upgraded to v7.0.0 docker image today and the
docker-compose run fedifetcher
command now fails. Forcing the image version to v6.0.0 fixes this.I would guess this is part of the code that tries to get the version number from git, but that git is not installed in the new image. (Haven't looked into to the code to check.)