Skip to content

Docker build fails when zip of repo was used as opposed to git clone #7420

@markg85

Description

@markg85

Hi,

The dockerfile contains:

# Build the thing.
# Also: fix getting HEAD commit hash via git rev-parse.
RUN cd $SRC_DIR \
  && mkdir .git/objects \
  && make build GOTAGS=openssl IPFS_PLUGINS=$IPFS_PLUGINS

The line && mkdir .git/objects \ fails when this repository was obtained using the download zip function in github. As in that case the .git folder won't exist thus mkdir fails as it would need to create 2 directories.

There are 2 potential fixes here.

  1. Just get rid of the line. Nothing seems to be dependent on it.
  2. Change it to: && mkdir -p .git/objects \ (note the -p) to make it work as intended.

I locally changed this to -p which made the build work.

Cheers,
Mark

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugA bug in existing code (including security flaws)need/triageNeeds initial labeling and prioritization

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions