[Bug]: Beam Website cannot run locally on Mac
- Dominant language
- Java
- Stars
- 8.7k
- Forks
- 4.7k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 205
Description
### What happened?
Beam website cannot run locally from the current master on my and @Malarg's Macs after following the README: https://github.com/apache/beam/blob/master/website/README.md
MacBooks I tried running it from:
MacBook Pro, 16-inch, 2019, Intel Core i7.
MacBook Air M1.
Docker version: 4.19.0 (106363)
Error:
```
git submodule update --init --recursive
./gradlew :website:serveWebsite
To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/7.5.1/userguide/gradle_daemon.html#sec:disabling_the_daemon.
Daemon will be stopped at the end of the build
Configuration on demand is an incubating feature.
> Task :website:buildDockerImage
#1 [internal] load .dockerignore
#1 transferring context: 2B done
#1 DONE 0.0s
#2 [internal] load build definition from Dockerfile
#2 transferring dockerfile: 2.56kB done
#2 DONE 0.0s
#3 [internal] load metadata for docker.io/library/debian:stable-slim
#3 DONE 3.1s
#4 [1/6] FROM docker.io/library/debian:stable-slim@sha256:d828cca5497a2519da9c6d42372066895fa28a69f1e8a46a38ce8f750bd2adf0
#4 DONE 0.0s
#5 [5/6] RUN HUGOHOME="$(mktemp -d)" && export HUGOHOME && curl -sL https://github.com/gohugoio/hugo/releases/download/v0.68.3/hugo_extended_0.68.3_Linux-64bit.tar.gz > "${HUGOHOME}/hugo.tar.gz" && tar -xzvf "${HUGOHOME}/hugo.tar.gz" hugo && mv hugo /usr/local/bin/hugo && chmod +x /usr/local/bin/hugo && rm -r "${HUGOHOME}"
#5 CACHED
#6 [2/6] RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl git gnupg2 gosu lynx && apt-get autoremove -yqq --purge && apt-get clean && rm -rf /var/lib/apt/lists/*
#6 CACHED
#7 [3/6] RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - && apt-get update && apt-get install -y --no-install-recommends nodejs && apt-get autoremove -yqq --purge && apt-get clean && rm -rf /var/lib/apt/lists/*
#7 CACHED
#8 [4/6] RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && apt-get update && apt-get install -y --no-install-recommends yarn && apt-get autoremove -yqq --purge && apt-get clean && rm -rf /var/lib/apt/lists/*
#8 CACHED
#9 [6/6] WORKDIR /opt/
#9 CACHED
#10 exporting to image
#10 exporting layers done
#10 writing image sha256:63fcce902089a39ab995ad5a56df6582999d87376f9f2e655e2fcc48cffe62b8 done
#10 naming to docker.io/library/beam-website done
#10 DONE 0.0s
> Task :website:startDockerContainer
f457ad0ad8518c0a9090e9b3428f49153ef0f299ad21dcb4d1dc8be88e971360
> Task :website:installDependencies
yarn install v1.22.19
warning Skipping preferred cache folder "/.cache/yarn" because it is not writable.
warning Selected the next writable cache folder in the list, will be "/tmp/.yarn-cache-501".
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.23s.
> Task :website:initGitSubmodules FAILED
fatal: detected dubious ownership in repository at '/opt'
To add an exception for this directory, call:
git config --global --add safe.directory /opt
> Task :website:buildCodeSamples
yarn run v1.22.19
warning Skipping preferred cache folder "/.cache/yarn" because it is not writable.
warning Selected the next writable cache folder in the list, will be "/tmp/.yarn-cache-501".
$ ./build_code_samples.sh
warning Cannot find a suitable global folder. Tried these: "/usr/local, /.yarn"
Working directory: /opt/website/www
Dist directory: ./site/code_samples
Done in 2.65s.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':website:initGitSubmodules'.
> Process 'command 'docker'' finished with non-zero exit value 128
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 42s
17 actionable tasks: 13 executed, 4 up-to-date
```

### Issue Priority
Priority: 1 (data loss / total loss of function)
### Issue Components
- [ ] Component: Python SDK
- [ ] Component: Java SDK
- [ ] Component: Go SDK
- [ ] Component: Typescript SDK
- [ ] Component: IO connector
- [ ] Component: Beam examples
- [ ] Component: Beam playground
- [ ] Component: Beam katas
- [X] Component: Website
- [ ] Component: Spark Runner
- [ ] Component: Flink Runner
- [ ] Component: Samza Runner
- [ ] Component: Twister2 Runner
- [ ] Component: Hazelcast Jet Runner
- [ ] Component: Google Cloud Dataflow Runner
Contributor guide
Research direction
Review website/README.md and reproduce the failure with ./gradlew :website:serveWebsite. Focus on the :website:initGitSubmodules error reporting “dubious ownership” at /opt; done means the Beam website starts locally without this failure on the reported Mac and Docker setup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, git
- Domain
- devops, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100