Skip to content

Commit

Permalink
Dockerfile.dapper: set $HOME properly
Browse files Browse the repository at this point in the history
`$HOME` refers to `$DAPPER_SOURCE`, which is set in the same expression
and is thus not visible at the time of substitution.

This problem is not immediately visible with Docker, Inc.'s docker
merely because it resets an unset `$HOME` to `/root` (but still breaking
the Go cache). Under podman, this problem is immediately visible because
an unset `$HOME` remains unset and subsequently breaks the `go generate`
invocation.

Fixes #9089.

Signed-off-by: Ivan Shapovalov <intelfx@intelfx.name>
  • Loading branch information
intelfx authored and brandond committed Jan 3, 2024
1 parent 30449e0 commit a7fe1aa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Dockerfile.dapper
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,10 @@ ENV DAPPER_RUN_ARGS="--privileged -v k3s-cache:/go/src/github.com/k3s-io/k3s/.ca
DAPPER_SOURCE="/go/src/github.com/k3s-io/k3s/" \
DAPPER_OUTPUT="./bin ./dist ./build/out ./build/static ./pkg/static ./pkg/deploy" \
DAPPER_DOCKER_SOCKET=true \
HOME=${DAPPER_SOURCE} \
CROSS=true \
STATIC_BUILD=true
# Set $HOME separately because it refers to $DAPPER_SOURCE, set above
ENV HOME=${DAPPER_SOURCE}

WORKDIR ${DAPPER_SOURCE}

Expand Down

0 comments on commit a7fe1aa

Please sign in to comment.