Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cqfd
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ docker_build() {

# Set the context
if [ -z "$project_build_context" ]; then
args+=("$(dirname "$dockerfile")")
args+=("$(dirname "$dockerfile")" --file "$dockerfile")
else
args+=("$project_build_context" --file "$dockerfile")
fi
Expand Down Expand Up @@ -728,7 +728,7 @@ load_config() {
# shellcheck disable=SC2154
release_tar_options="$tar_options"

dockerfile="$cqfddir/${build_distro:-docker}/Dockerfile"
dockerfile=$(realpath "$cqfddir/${build_distro:-docker}/Dockerfile")
if [ ! -f "$dockerfile" ]; then
die "$dockerfile not found"
fi
Expand Down
25 changes: 25 additions & 0 deletions tests/05-cqfd_run_dockerfile_symlink.bats
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bats

setup_file() {
mkdir -p .cqfd-symlink/docker
}

setup() {
load 'test_helper/common-setup'
_common_setup
}

teardown_file() {
rm -r .cqfd-symlink
}

@test "cqfd init fails without a Dockerfile" {
run cqfd -d .cqfd-symlink init
assert_failure
}

@test "cqfd init succeeds with symlinked Dockerfile" {
ln -s ../../.cqfd/docker/Dockerfile .cqfd-symlink/docker/Dockerfile
run cqfd -d .cqfd-symlink init
assert_success
}
1 change: 1 addition & 0 deletions tests/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.PHONY: tests check

tests: CQFD_DOCKER =
tests: CQFD_DEBUG =
tests: CQFD_EXTRA_RUN_ARGS =
tests: CQFD_EXTRA_BUILD_ARGS =
tests: CQFD_EXTRA_RMI_ARGS =
Expand Down
Loading