Skip to content

Commit 4e57503

Browse files
committed
Use long options in code
1 parent 26e3346 commit 4e57503

File tree

9 files changed

+19
-19
lines changed

9 files changed

+19
-19
lines changed

.github/actions/load-image/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ runs:
2222
- name: Load downloaded image to docker 📥
2323
run: |
2424
docker load --input /tmp/${{ inputs.image }}-${{ inputs.platform }}.tar
25-
docker image ls -a
25+
docker image ls --all
2626
shell: bash
2727
- name: Delete the file 🗑️
2828
run: rm -f /tmp/${{ inputs.image }}-${{ inputs.platform }}.tar

.github/workflows/docker-build-test-upload.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ jobs:
4141
- name: Reset docker state and cleanup artifacts 🗑️
4242
if: ${{ inputs.platform != 'x86_64' }}
4343
run: |
44-
docker kill $(docker ps -q) || true
45-
docker rm $(docker ps -a -q) || true
44+
docker kill $(docker ps --quiet) || true
45+
docker rm $(docker ps --all --quiet) || true
4646
docker system prune --all --force
4747
rm -rf /tmp/tags/
4848
rm -rf /tmp/hist_lines/

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ help:
3636

3737
build/%: DOCKER_BUILD_ARGS?=
3838
build/%: ## build the latest image for a stack using the system's architecture
39-
docker build $(DOCKER_BUILD_ARGS) --rm --force-rm -t $(OWNER)/$(notdir $@):latest ./$(notdir $@) --build-arg OWNER=$(OWNER)
39+
docker build $(DOCKER_BUILD_ARGS) --rm --force-rm --tag $(OWNER)/$(notdir $@):latest ./$(notdir $@) --build-arg OWNER=$(OWNER)
4040
@echo -n "Built image size: "
4141
@docker images $(OWNER)/$(notdir $@):latest --format "{{.Size}}"
4242
build-all: $(foreach I, $(ALL_IMAGES), build/$(I)) ## build all stacks
@@ -51,10 +51,10 @@ check-outdated-all: $(foreach I, $(ALL_IMAGES), check-outdated/$(I)) ## check al
5151
cont-clean-all: cont-stop-all cont-rm-all ## clean all containers (stop + rm)
5252
cont-stop-all: ## stop all containers
5353
@echo "Stopping all containers ..."
54-
-docker stop -t0 $(shell docker ps -a -q) 2> /dev/null
54+
-docker stop --time 0 $(shell docker ps --all --quiet) 2> /dev/null
5555
cont-rm-all: ## remove all containers
5656
@echo "Removing all containers ..."
57-
-docker rm --force $(shell docker ps -a -q) 2> /dev/null
57+
-docker rm --force $(shell docker ps --all --quiet) 2> /dev/null
5858

5959

6060

@@ -82,7 +82,7 @@ img-rm: ## remove jupyter images
8282
-docker rmi --force $(shell docker images --quiet "$(OWNER)/*") 2> /dev/null
8383
img-rm-dang: ## remove dangling images (tagged None)
8484
@echo "Removing dangling images ..."
85-
-docker rmi --force $(shell docker images -f "dangling=true" -q) 2> /dev/null
85+
-docker rmi --force $(shell docker images -f "dangling=true" --quiet) 2> /dev/null
8686

8787

8888

docs/using/recipes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ ENTRYPOINT ["jupyter", "lab", "--ip=0.0.0.0", "--allow-root"]
132132
And build the image as:
133133

134134
```bash
135-
docker build -t jupyter/scipy-dasklabextension:latest .
135+
docker build --tag jupyter/scipy-dasklabextension:latest .
136136
```
137137

138138
Once built, run using the command:

docs/using/running.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ Pressing `Ctrl-C` twice shuts down the notebook server but leaves the container
3737

3838
```bash
3939
# list containers
40-
docker ps -a
40+
docker ps --all
4141
# CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
4242
# 221331c047c4 jupyter/scipy-notebook:2023-06-01 "tini -g -- start-no…" 11 seconds ago Exited (0) 8 seconds ago cranky_benz
4343

4444
# start the stopped container
45-
docker start -a 221331c047c4
45+
docker start --attach 221331c047c4
4646
# Entered start.sh with args: jupyter lab
4747
# ...
4848

@@ -71,12 +71,12 @@ This command pulls the `jupyter/all-spark-notebook` image currently tagged `late
7171
It then starts a container named `notebook` running a JupyterLab server and exposes the server on a randomly selected port.
7272

7373
```bash
74-
docker run -d -P --name notebook jupyter/all-spark-notebook
74+
docker run --detach -P --name notebook jupyter/all-spark-notebook
7575
```
7676

7777
where:
7878

79-
- `-d`: will run the container in detached mode
79+
- `--detach`: will run the container in detached mode
8080

8181
You can also use the following docker commands to see the port and notebook server token:
8282

docs/using/specifics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ This page provides details about features specific to one or more images.
1414
Every new spark context that is created is put onto an incrementing port (i.e. 4040, 4041, 4042, etc.), and it might be necessary to open multiple ports.
1515
```
1616

17-
For example: `docker run -d -p 8888:8888 -p 4040:4040 -p 4041:4041 jupyter/pyspark-notebook`.
17+
For example: `docker run --detach -p 8888:8888 -p 4040:4040 -p 4041:4041 jupyter/pyspark-notebook`.
1818

1919
#### IPython low-level output capture and forward
2020

docs/using/troubleshooting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ The following sections cover a few of these scenarios and how to fix them.
4242

4343
```bash
4444
# running in detached mode - can also be run in interactive mode
45-
docker run -d \
45+
docker run --detach \
4646
-v <my-vol>:<container-dir> \
4747
-p 8888:8888 \
4848
--user root \

examples/make-deploy/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ IMAGE:=my-notebook
88
# Common, extensible docker run command
99
define RUN_NOTEBOOK
1010
@docker volume create --name $(WORK_VOLUME) > /dev/null
11-
-@docker rm -f $(NAME) 2> /dev/null
12-
@docker run -d -p $(PORT):8888 \
11+
-@docker rm --force $(NAME) 2> /dev/null
12+
@docker run --detach -p $(PORT):8888 \
1313
--name $(NAME) \
1414
-v $(WORK_VOLUME):/home/jovyan/work \
1515
$(DOCKER_ARGS) \
@@ -27,7 +27,7 @@ check:
2727

2828
image: DOCKER_ARGS?=
2929
image:
30-
@docker build --rm $(DOCKER_ARGS) -t $(IMAGE) .
30+
@docker build --rm $(DOCKER_ARGS) --tag $(IMAGE) .
3131

3232
notebook: PORT?=80
3333
notebook: NAME?=notebook

examples/make-deploy/letsencrypt.makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ letsencrypt:
3030
--agree-tos \
3131
--domain '$(FQDN)' \
3232
--email '$(EMAIL)'; \
33-
docker rm -f $(TMP_CONTAINER) > /dev/null
33+
docker rm --force $(TMP_CONTAINER) > /dev/null
3434
# The letsencrypt image has an entrypoint, so we use the notebook image
3535
# instead so we can run arbitrary commands.
3636
# Here we set the permissions so nobody can read the cert and key.
@@ -42,7 +42,7 @@ letsencrypt:
4242
$(NOTEBOOK_IMAGE) \
4343
bash -c "ln -s /etc/letsencrypt/live/$(FQDN)/* /etc/letsencrypt/ && \
4444
find /etc/letsencrypt -type d -exec chmod 755 {} +"; \
45-
docker rm -f $(TMP_CONTAINER) > /dev/null
45+
docker rm --force $(TMP_CONTAINER) > /dev/null
4646

4747
letsencrypt-notebook: PORT?=443
4848
letsencrypt-notebook: NAME?=notebook

0 commit comments

Comments
 (0)