crate / crate/cratedb-guide

Fix Docker volume mount PWD usage across integration tutorials

Open
#262 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
3
Forks
4
Avg merge
3d 18h
Merged PRs (30d)
1

Description

## Problem

Several integration tutorial files use `$(PWD)` in Docker volume mount commands, which attempts command substitution but fails because PWD is an environment variable, not a command. This causes Docker volume mounts to fail with empty paths.

## Current Issue

In the Linux/macOS sections, the pattern `--volume=$(PWD):/demo` tries to execute a command named 'PWD' which doesn't exist, resulting in:
- `PWD: command not found` error
- Empty volume mount path
- Failure to access files like `@/demo/init.sql`

## Files Affected

Based on codebase analysis, the following file currently has this issue:
- `docs/integrate/oracle/tutorial.md` (Line 45)

Interestingly, the same file correctly uses `--volume=${PWD}:/demo` in the Windows PowerShell section (Line 53), showing the correct syntax.

## Other Files Reviewed

The following files use correct syntax with `$PWD` (environment variable):
- `docs/integrate/influxdb/tutorial.md` (Line 50): `--volume="$PWD/var/lib/cratedb:/data"`
- `docs/feature/search/fts/analyzer.md` (Lines 169-170): `--volume="$PWD/synonyms-*.txt:/crate/config/"`

## Solutions

Replace `$(PWD)` with either:
1. `$PWD` - Use the environment variable directly
2. `$(pwd)` - Use command substitution with lowercase `pwd` command

## Technical Context

- `$(PWD)` = Command substitution attempting to run 'PWD' command (fails)
- `$PWD` = Environment variable containing current working directory (correct)
- `$(pwd)` = Command substitution running 'pwd' command (also correct)

## Related

- PR: https://github.com/crate/cratedb-guide/pull/261
- Original discussion: https://github.com/crate/cratedb-guide/pull/261#discussion_r2280885928

This issue was identified during review of the Oracle integration tutorial and should be fixed to ensure proper Docker volume mounting functionality.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.