Skip to content

Commit 05bac78

Browse files
authored
docker compose syntax updates and minor changes (#223)
1 parent e63861d commit 05bac78

7 files changed

Lines changed: 33 additions & 62 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ cd workshop
3434
./geopython-workshop-ctl.sh stop
3535
```
3636

37-
Windows (Powershell or Command Prompt):
37+
Windows (PowerShell or Command Prompt):
3838

3939
```bat
4040
cd workshop
@@ -43,7 +43,7 @@ cd workshop
4343
.\win-geopython-workshop-ctl.bat stop
4444
```
4545

46-
Windows (Powershell + bash):
46+
Windows (PowerShell + bash):
4747

4848
```bash
4949
cd workshop

web/docs/docker.md

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,6 @@ which is dependent on the system/OS you are running (e.g. Windows, Mac or Linux)
2626
system the Docker website provides detailed installation instructions.
2727
Please follow these consistently.
2828

29-
> Docker Compose in older (pre Compose v2) versions was a separate (Python) program to install,
30-
> though it was usually present in Docker Desktop.
31-
> The `docker compose` command in that case is `docker-compose` (hyphened).
32-
> Since 2021, Docker Desktop includes Compose in the Docker CLI.
33-
> The command is then `docker compose` (space).
34-
35-
In our texts we will use `docker-compose`. Depending on your installation you may need
36-
to replace the hyphen (`-`) with a space. But you can always install the original
37-
compose (`docker-compose`) via `pip install docker-compose`.
38-
3929
For many platforms a product called [Docker Desktop](https://docs.docker.com/desktop) is available, which includes the main Docker components:
4030

4131
* Windows [installation](https://docs.Docker.com/desktop/install/windows-install)
@@ -52,12 +42,9 @@ Some notes:
5242

5343
If all goes well, you should be able to run Docker from the command line as follows: [^2]
5444

55-
<div class="termy">
56-
5745
```console
5846
$ docker --version
59-
Docker version 20.10.17, build 100c701
60-
$ docker-compose --version
61-
Docker Compose version v2.6.1
47+
Docker version 29.4.0, build 9d7ad9f
48+
$ docker compose version
49+
Docker Compose version v5.1.1
6250
```
63-
</div>

web/docs/index.md

Lines changed: 17 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -44,43 +44,41 @@ Having said this, please feel free to bring your own! Examples:
4444
## Verifying your environment
4545

4646
Ensure Docker is running on your computer, then verify that the `docker`
47-
and `docker-compose` commands are working and available:
47+
and `docker compose` commands are working and available:
4848

4949

5050
```console
5151
$ docker version
5252

53+
$ docker compose version
54+
```
55+
56+
If `docker compose` gives an error or is not available, your system may be
57+
using the legacy Docker Compose command. In that case, try:
58+
59+
```console
5360
$ docker-compose --version
5461
```
5562

56-
If `docker-compose` gives a 'program not found' error:
63+
If the above command works, use `docker-compose` wherever the workshop
64+
documentation shows `docker compose`.
5765

58-
> In recent versions of Docker the Docker Compose program is part
59-
> of the Docker CLI, thus following the `docker <cmd>` pattern.
60-
> If `docker-compose --version` as above fails for you,
61-
> try `docker compose version` (all spaces). If the latter command works
62-
> then use `docker compose` where the text shows `docker-compose`.
63-
> Note that our main Bash script `geopython-workshop-ctl.sh` (see below) will
64-
> figure out which variant you have installed and call the prober Docker Compose
65-
> command.
66+
Note that the workshop control scripts (`geopython-workshop-ctl.sh` and
67+
`win-geopython-workshop-ctl.bat`) automatically detect which Docker Compose
68+
variant is installed and invoke the appropriate command.
6669

6770
## Installation
6871

6972
Below we will download and run the workshop content.
7073

71-
<div class="termy">
72-
7374
```console
7475
curl -O https://codeload.github.com/geopython/geopython-workshop/zip/master
7576
unzip master
7677
cd geopython-workshop-master/workshop
7778
```
78-
</div>
7979

8080
Linux, macOS:
8181

82-
<div class="termy">
83-
8482
```console
8583
// start the workshop
8684

@@ -94,14 +92,11 @@ Linux, macOS:
9492

9593
./geopython-workshop-ctl.sh stop
9694
```
97-
</div>
98-
99-
Windows (Powershell or Command Prompt):
10095

101-
<div class="termy">
96+
Windows (PowerShell or Command Prompt):
10297

10398
```console
104-
// start the workshop
99+
// start the workshop (from wthin the /workshop folder)
105100

106101
.\win-geopython-workshop-ctl.bat start
107102

@@ -114,25 +109,18 @@ Windows (Powershell or Command Prompt):
114109
.\win-geopython-workshop-ctl.bat stop
115110
```
116111

117-
</div>
118-
119112
If the above `.sh` script does not work on your system
120-
you can execute `docker-compose` directly via:
121-
122-
<div class="termy">
113+
you can execute `docker compose` directly via:
123114

124115
```console
125116
// in dir geopython-workshop-master/workshop
126-
docker-compose up -d
117+
docker compose up -d
127118
docker logs --follow geopython-workshop-jupyter
128119
// look for URL+Token and Copy/Paste in browser
129120
```
130-
</div>
131121

132122
Below are utility commands. Use when stopped to clean and update.
133123

134-
<div class="termy">
135-
136124
```console
137125
// update the workshop Docker Images in case of new versions
138126

@@ -144,9 +132,6 @@ Below are utility commands. Use when stopped to clean and update.
144132
./geopython-workshop-ctl.sh clean
145133

146134
```
147-
</div>
148-
149-
150135

151136
## Installation Issues
152137

workshop/docker-compose-services.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Optional services - not for regular workshop like FOSS4G.
2-
# start: docker-compose -f docker-compose-services.yml up -d
3-
# stop: docker-compose -f docker-compose-services.yml stop
4-
# (or 'docker compose', space for dash, if your DOcker version mandates).
2+
# start: docker compose -f docker-compose-services.yml up -d
3+
# stop: docker compose -f docker-compose-services.yml stop
54
#
65
# The Docker Network workshop_default is provided by and shared with
76
# Workshop Jupyter notebook run from docker-compose.yml for remote API access.

workshop/jupyter/content/notebooks/04-vector-data.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"There are currently [over 100 vector data formats](https://gdal.org/drivers/vector/index.html) used for storage, e.g. files, and for data transfer.\n",
3939
"The most common formats are presented below. \n",
4040
"\n",
41-
"> Tip: [ogr2ogr](https://gdal.org/programs/ogr2ogr.html) is a GDAL/OGR commandline utility\n",
41+
"> Tip: [gdal vector convert](https://gdal.org/en/stable/programs/gdal_vector_convert.html) is a GDAL commandline utility\n",
4242
"> that allows you to convert between most vector formats. \n",
4343
"\n",
4444
"### ESRI Shapefile\n",
@@ -140,7 +140,7 @@
140140
"[PostGIS](https://postgis.net) adds support for geographic objects to the PostgreSQL object-relational database. \n",
141141
"In effect, PostGIS \"spatially enables\" the PostgreSQL server, allowing it to be \n",
142142
"used as a backend spatial database for geographic information systems (GIS), \n",
143-
"much like ESRI's SDE or Oracle's Spatial extension. \n",
143+
"much like Oracle's Spatial extension. \n",
144144
"PostGIS follows the OGC [Simple Features Specification for SQL](https://www.opengeospatial.org/standards/sfs) \n",
145145
"and has been certified as compliant with the \"Types and Functions\" profile. \n",
146146
"\n",
@@ -150,7 +150,7 @@
150150
"Within Python there is an ample choice of libraries to interact with vector data. The\n",
151151
"most popular are:\n",
152152
"\n",
153-
"* [Python bindings](https://gdal.org/python/) for [GDAL OGR](https://gdal.org/), a.k.a. \"OGR\"\n",
153+
"* [Python bindings](https://gdal.org/en/stable/api/python/index.html) for [GDAL](https://gdal.org/), a.k.a. [OGR](https://gdal.org/en/stable/glossary.html#term-OGR)\n",
154154
"* [Fiona](https://toblerity.org/fiona/manual.html) \n",
155155
"* [GeoPandas](https://geopandas.org/) \n",
156156
" \n",

workshop/jupyter/content/notebooks/09-publishing.ipynb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,8 @@
3838
"\n",
3939
"Do this in your shell in the `workshop` directory.\n",
4040
"\n",
41-
"* start: `docker-compose -f docker-compose-services.yml up -d`\n",
42-
"* stop: `docker-compose -f docker-compose-services.yml stop`\n",
43-
"\n",
44-
"(Or use `docker compose` i.s.o. `docker-compose` if you Docker-version mandates that format.)."
41+
"* start: `docker compose -f docker-compose-services.yml up -d`\n",
42+
"* stop: `docker compose -f docker-compose-services.yml stop`\n"
4543
]
4644
},
4745
{

workshop/services/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@ locally volume mounted configuration files which then, on docker container
88
restart, will reflect updates made.
99

1010
## Running
11+
1112
Optional services - not for regular workshop.
1213

13-
* start: docker-compose -f docker-compose-services.yml up -d
14-
* stop: docker-compose -f docker-compose-services.yml stop
14+
* start: docker compose -f docker-compose-services.yml up -d
15+
* stop: docker compose -f docker-compose-services.yml stop
1516

1617
While running you can publish data, and then restart each individual container. See below.
18+
1719
## Publishing Data
1820

1921
Basic workflow:

0 commit comments

Comments
 (0)