Skip to content

Commit

Permalink
Revert to /docker, fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
nyurik committed Jul 24, 2024
1 parent ac006ea commit a5cad59
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @generated
# Input hashes for repository rule npm_translate_lock(name = "npm", pnpm_lock = "//:pnpm-lock.yaml").
# This file should be checked into version control along with the pnpm-lock.yaml file.
pnpm-lock.yaml=322447152
package.json=1512585561
.npmrc=-592547263
pnpm-lock.yaml=104874376
package-lock.json=-1109603374
package.json=752745807
File renamed without changes.
File renamed without changes.
File renamed without changes.
15 changes: 9 additions & 6 deletions platform/linux/docker/README.md → docker/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Linux
# Building with Docker

These steps will allow you to compile code as described [platform/linux/README.md](../README.md) using a Docker container. All the steps should be executed from the root of the repository.
These steps will allow you to compile code as described [platform/linux/README.md](../platform/linux/README.md) using a Docker container. All the steps should be executed from the root of the repository.

> [!IMPORTANT]
> Not all platform builds are currently supported. Docker builds are a work in progress.
> [!IMPORTANT]
> You cannot build MapLibre native using both Docker and host methods at the same time. If you want to switch, you need to clean the repository first, e.g. by using this command:
Expand All @@ -21,20 +24,20 @@ docker build \
-t maplibre-native-image \
--build-arg USER_UID=$(id -u) \
--build-arg USER_GID=$(id -g) \
-f platform/linux/docker/Dockerfile \
platform/linux/docker
-f docker/Dockerfile \
docker
```
## Run Docker Container

```bash
# Run all build commands using the docker container.
# You can also execute build commands from inside the docker container by starting it without the build command.
docker run --rm -it -v "$PWD:/app/" -v "$PWD/platform/linux/docker/.cache:/home/user/.cache" maplibre-native-image
docker run --rm -it -v "$PWD:/app/" -v "$PWD/docker/.cache:/home/user/.cache" maplibre-native-image
```

You can also use the container to run just one specific commands, e.g. `cmake` or `bazel`. Any downloaded dependencies will be cached in the `docker/.cache` directory.

```bash
docker run --rm -it -v "$PWD:/app/" -v "$PWD/platform/linux/docker/.cache:/home/user/.cache" maplibre-native-image cmake ...
docker run --rm -it -v "$PWD:/app/" -v "$PWD/docker/.cache:/home/user/.cache" maplibre-native-image cmake ...
```
File renamed without changes.
2 changes: 1 addition & 1 deletion platform/linux/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Optional: `libsqlite3-dev` (also available as vendored dependency).

### Building with Docker

See instructions in [docker/README.md](docker/README.md) to build in a docker container.
See instructions in [docker/README.md](../../docker/README.md) to build in a docker container.

## Build

Expand Down
Empty file.

0 comments on commit a5cad59

Please sign in to comment.