GithubHelp home page GithubHelp logo

Comments (6)

aspacca avatar aspacca commented on June 14, 2024

hello @luckman212 , thanks for reporting this bug

the problem is that the build command on docker file does not work properly, with git describe --tags failing since it's run not inside a git repo

from transfer.sh.

luckman212 avatar luckman212 commented on June 14, 2024

Is there any workaround you could suggest? What about just hardcoding the current version in a VERSION file and having the Dockerfile read from that?

from transfer.sh.

stefanbenten avatar stefanbenten commented on June 14, 2024

You can use watchtower to achieve the same without having to write a script :)

from transfer.sh.

luckman212 avatar luckman212 commented on June 14, 2024

Ok I'll look into that, thanks

from transfer.sh.

amayer5125 avatar amayer5125 commented on June 14, 2024

I believe the issue is that ".git" is in .dockerignore. When COPY . . is run, the files in .dockerignore are skipped. Since the .git directory isn't copied into the docker image the command that sets the version (git describe --tags) fails. Removing ".git" from .dockerignore fixes the issue for me.

$ docker run --rm transfer.sh version 
transfer.sh v1.6.1-1-gd4f1b84: Easy file sharing from the command line

I don't believe removing .git from the .dockerignore file is the correct solution for the repo though because then the container will be larger.

from transfer.sh.

aspacca avatar aspacca commented on June 14, 2024

I don't believe removing .git from the .dockerignore file is the correct solution for the repo though because then the container will be larger.

the final image is based on scratch, we can remove .git from the .dockerignore without having a bigger image. the .git folder will be copied only in the build stage of the image

from transfer.sh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.