Skip to content

Commit b0f74af

Browse files
committed
Update table
1 parent 6016114 commit b0f74af

File tree

1 file changed

+54
-20
lines changed

1 file changed

+54
-20
lines changed

README.md

Lines changed: 54 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
<!-- README.md is generated from README.Rmd. Please edit that file -->
23

34
# Geocomputation with Docker
@@ -76,7 +77,7 @@ docker run -d -p 8786:8787 -e DISABLE_AUTH=TRUE -v $(pwd):/home/rstudio/geocompr
7677
![](https://user-images.githubusercontent.com/1825120/39538109-9b50e7ac-4e33-11e8-93b3-e00e95a79294.png)
7778

7879
If you see something like this after following the steps above,
79-
congratulations: it worked! See
80+
congratulations: it worked\! See
8081
[github.com/rocker-org](https://github.com/rocker-org/rocker/wiki/Using-the-RStudio-image#running-rstudio-server)
8182
for more info.
8283

@@ -107,26 +108,26 @@ including builds that use more up-to-date versions of OSGeo packages
107108
such as GDAL provided by the [UbuntuGIS software
108109
repository](https://wiki.ubuntu.com/UbuntuGIS), as shown below:
109110

110-
| image | description | size |
111-
|----|----|----|
112-
| [latest](https://github.com/geocompx/docker/pkgs/container/docker/) | docker pull ghcr.io/geocompx/latest image + book files | ![](https://ghcr-badge.deta.dev/geocompx/docker/size?tag=latest) |
113-
| [minimal](https://github.com/geocompx/docker/blob/master/minimal) | docker pull ghcr.io/geocompx/minimal rocker/geospatial plus geocompkg Imports | ![](https://ghcr-badge.deta.dev/geocompx/docker/size?tag=minimal) |
114-
| [suggests](https://github.com/geocompx/docker/blob/master/suggests) | docker pull ghcr.io/geocompx/suggests includes all packages from geocompkgs (Suggests) | ![](https://ghcr-badge.deta.dev/geocompx/docker/size?tag=suggests) |
115-
| [binder](https://github.com/geocompx/docker/blob/master/binder) | docker pull ghcr.io/geocompx/binder runs with Binder | ![](https://ghcr-badge.deta.dev/geocompx/docker/size?tag=binder) |
116-
| [osgeo](https://github.com/geocompx/docker/blob/master/) | docker pull ghcr.io/geocompx/osgeo running on rocker/geospatial:osgeo | ![](https://ghcr-badge.deta.dev/geocompx/docker/size?tag=osgeo) |
117-
| [buildbook](https://github.com/geocompx/docker/blob/master/) | docker pull ghcr.io/geocompx/buildbook runs the book code | ![](https://ghcr-badge.deta.dev/geocompx/docker/size?tag=buildbook) |
118-
| [qgis](https://github.com/geocompx/docker/blob/master/) | docker pull ghcr.io/geocompx/qgis with QGIS | ![](https://ghcr-badge.deta.dev/geocompx/docker/size?tag=qgis) |
119-
| [rocker-rpy](https://github.com/geocompx/docker/blob/master/) | docker pull ghcr.io/geocompx/rocker-rpy with python | ![](https://ghcr-badge.deta.dev/geocompx/docker/size?tag=rocker-rpy) |
120-
| [rocker-rpyjl](https://github.com/geocompx/docker/blob/master/) | docker pull ghcr.io/geocompx/rocker-rpyjl with R, Python, and Julia | ![](https://ghcr-badge.deta.dev/geocompx/docker/size?tag=rocker-rpyjl) |
121-
| [python](https://github.com/geocompx/docker/blob/master/) | docker pull ghcr.io/geocompx/python Python image + geo pkgs | ![](https://ghcr-badge.deta.dev/geocompx/docker/size?tag=python) |
122-
| [rust](https://github.com/geocompx/docker/blob/master/) | docker pull ghcr.io/geocompx/rust with Rust | ![](https://ghcr-badge.deta.dev/geocompx/docker/size?tag=rust) |
123-
| [mamba-py](https://github.com/geocompx/docker/blob/master/) | docker pull ghcr.io/geocompx/mamba-py | ![](https://ghcr-badge.deta.dev/geocompx/docker/size?tag=mamba-py) |
124-
| [mamba-pyr](https://github.com/geocompx/docker/blob/master/) | docker pull ghcr.io/geocompx/mamba-pyr | ![](https://ghcr-badge.deta.dev/geocompx/docker/size?tag=mamba-pyr) |
111+
| Image | Command | Size |
112+
| :----------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :----- |
113+
| [binder](https://ghcr.io/geocompx/binder:latest) | [docker pull ghcr.io/geocompx/binder](https://github.com/geocompx/geocompr/blob/master/) | 6.74GB |
114+
| [buildbook](https://ghcr.io/geocompx/buildbook:latest) | [docker pull ghcr.io/geocompx/buildbook](https://github.com/geocompx/geocompr/blob/master/) | 6.44GB |
115+
| [geocompy](https://ghcr.io/geocompx/geocompy:latest) | [docker pull ghcr.io/geocompx/latest](https://github.com/geocompx/geocompr/blob/master/) | 5.09GB |
116+
| [minimal](https://ghcr.io/geocompx/minimal:latest) | [docker pull ghcr.io/geocompx/minimal](https://github.com/geocompx/geocompr/blob/master/) | 5.43GB |
117+
| [osgeo](https://ghcr.io/geocompx/osgeo:latest) | [docker pull ghcr.io/geocompx/osgeo](https://github.com/geocompx/geocompr/blob/master/) | 6.07GB |
118+
| [python](https://ghcr.io/geocompx/python:latest) | [docker pull ghcr.io/geocompx/python](https://github.com/geocompx/geocompr/blob/master/) | 2.32GB |
119+
| [pythonr](https://ghcr.io/geocompx/pythonr:latest) | [docker pull ghcr.io/geocompx/pythonr](https://github.com/geocompx/geocompr/blob/master/) | 4.37GB |
120+
| [qgis](https://ghcr.io/geocompx/qgis:latest) | [docker pull ghcr.io/geocompx/qgis](https://github.com/geocompx/geocompr/blob/master/) | 8.63GB |
121+
| [rocker-rpy](https://ghcr.io/geocompx/rocker-rpy:latest) | [docker pull ghcr.io/geocompx/rocker-rpy](https://github.com/geocompx/geocompr/blob/master/) | 6.46GB |
122+
| [rocker-rpyjl](https://ghcr.io/geocompx/rocker-rpyjl:latest) | [docker pull ghcr.io/geocompx/rocker-rpyjl](https://github.com/geocompx/geocompr/blob/master/) | 7.68GB |
123+
| [rust](https://ghcr.io/geocompx/rust:latest) | [docker pull ghcr.io/geocompx/rust](https://github.com/geocompx/geocompr/blob/master/) | 7.63GB |
124+
| [suggests](https://ghcr.io/geocompx/suggests:latest) | [docker pull ghcr.io/geocompx/suggests](https://github.com/geocompx/geocompr/blob/master/) | 5.67GB |
125+
| [unzipped](https://ghcr.io/geocompx/unzipped:latest) | [docker pull ghcr.io/geocompx/unzipped](https://github.com/geocompx/geocompr/blob/master/) | 4.98GB |
125126

126127
The base image is `rocker/geospatial` from
127128
[github.com/rocker-org/rocker-versioned2](https://github.com/rocker-org/rocker-versioned2).
128129

129-
Add :tagname after ghcr.io/geocompx/<image> to get the image you want.
130+
Add :tagname after ghcr.io/geocompx/imagename to get the image you want.
130131

131132
<!-- To run the `buildbook` version (represented by the extension `-b` for most tags), for example, run the following command (with port and password set to a port of your preference): -->
132133

@@ -153,6 +154,7 @@ docker run -d -p 8786:8787 -v $(pwd):/home/rstudio/data \
153154
The Python tag contains Python geospatial packages:
154155

155156
``` bash
157+
docker pull ghcr.io/geocompx/python
156158
docker run -e PASSWORD=pw --rm -ti ghcr.io/geocompx/python /bin/bash
157159

158160
python3
@@ -254,19 +256,51 @@ disposal from the R command line 🎉
254256

255257
## Building the images locally
256258

257-
You can build the images locally, e.g. as follows:
259+
You can build the images locally, e.g. as follows:
258260

259261
``` bash
260262
docker build qgis -t test
261263
docker run -p 8888:8888 test
262264
docker build conda -t geocompy
263265
docker run -it geocompy /bin/bash
266+
docker build -t
264267
```
265268

266269
You should then be able to run commands in the newly created images,
267-
e.g. with:
270+
e.g. with:
268271

269272
``` bash
270-
docker run -it test /bin/bash
273+
docker run -it /bin/bash
271274
```
272275

276+
### Using GitHub PAT with BuildKit secret mounts
277+
278+
Some images (like `suggests` and `rust`) require GitHub API access to
279+
install packages from GitHub repositories. To avoid hitting GitHub API
280+
rate limits, you can securely pass a GitHub Personal Access Token (PAT)
281+
during the build process using BuildKit secret mounts:
282+
283+
1. First, create a GitHub Personal Access Token by following the
284+
instructions at [GitHub
285+
Docs](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)
286+
287+
2. Save your token to a file (but don’t commit this file to version
288+
control):
289+
290+
``` bash
291+
echo "your_github_token" > GITHUB_PAT.txt
292+
```
293+
294+
3. Build the image using BuildKit secret mounts:
295+
296+
``` bash
297+
# Enable BuildKit
298+
export DOCKER_BUILDKIT=1
299+
300+
# Build with secret mount
301+
docker build --secret id=GITHUB_PAT,src=GITHUB_PAT.txt -t geocompx/suggests suggests
302+
```
303+
304+
This approach is more secure than using build arguments or environment
305+
variables because the secret is only available during the specific build
306+
steps that need it and is not stored in any image layer or build cache.

0 commit comments

Comments
 (0)