-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (27 loc) · 1.15 KB
/
Makefile
File metadata and controls
32 lines (27 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Base image built from Dockerfile.base (CI pushes to executionengine.azurecr.io)
BASE_IMAGE ?= executionengine.azurecr.io/darwin-eu-dev/examplestudy-base:latest
RSTUDIO_PORT ?= 8787
.PHONY: push pull rstudio rstudio-stop
push:
git add .
git commit -m "debug actions"
git push
# Pull the base image (use before make rstudio if not already pulled). Uses linux/amd64 on Apple Silicon.
pull:
docker pull --platform linux/amd64 $(BASE_IMAGE)
# Run RStudio Server from the base image. Open http://127.0.0.1:$(RSTUDIO_PORT)
# Login: username rstudio, password rstudio
# Usage: make rstudio [BASE_IMAGE=your-base:tag] ; make rstudio-stop to stop
# --platform linux/amd64: base image is amd64-only (Snowflake/SQL Server ODBC); required on Apple Silicon.
rstudio:
-docker rm -f rstudio 2>/dev/null || true
docker run -d --platform linux/amd64 \
-e USER=rstudio \
-e PASSWORD=rstudio \
-p 127.0.0.1:$(RSTUDIO_PORT):8787 \
--name rstudio \
$(BASE_IMAGE) \
bash -c "rstudio-server start && tail -f /dev/null"
@echo "RStudio Server: http://127.0.0.1:$(RSTUDIO_PORT) (user: rstudio, password: rstudio)"
rstudio-stop:
docker rm -f rstudio 2>/dev/null || true