Skip to content

Commit 9f0f590

Browse files
authored
Merge pull request #156 from UBC-DSCI/docker-update
Docker update
2 parents d74711b + 4184d39 commit 9f0f590

File tree

4 files changed

+81
-2
lines changed

4 files changed

+81
-2
lines changed

.github/workflows/publish_image_to_dockerhub.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
name: Publish Docker image on DockerHub
22
on:
33
push:
4+
branches:
5+
- master
46
paths:
57
- 'Dockerfile'
8+
69
jobs:
710
build:
811
runs-on: ubuntu-latest
@@ -17,6 +20,14 @@ jobs:
1720
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1821
WITH_V: true
1922
id: bump
23+
- name: update Docker Compose
24+
id: update_docker_compose
25+
run: |
26+
git config --local user.email "[email protected]"
27+
git config --local user.name "GitHub Action"
28+
git pull origin master
29+
awk '{gsub("v[0-9]+[.]+.+", ${{ steps.bump.outputs.new_tag }}, $0); print}' docker-compose.yml
30+
git commit -m "update Docker Compose" -a
2031
- name: Create Release
2132
id: create_release
2233
uses: actions/create-release@v1

Dockerfile

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Copyright (c) UBC-DSCI Development Team.
2-
FROM rocker/verse:4.0.0
2+
FROM rocker/verse:4.1.0
33

44
RUN apt-get update --fix-missing \
55
&& apt-get install -y \
@@ -45,3 +45,45 @@ RUN apt-get update -qq && install2.r --error \
4545
tidymodels \
4646
reticulate \
4747
kknn
48+
49+
RUN Rscript -e "devtools::install_github('ttimbers/[email protected]')"
50+
51+
# install LaTeX packages
52+
RUN tlmgr install amsmath \
53+
latex-amsmath-dev \
54+
fontspec \
55+
tipa \
56+
unicode-math \
57+
xunicode \
58+
kvoptions \
59+
ltxcmds \
60+
kvsetkeys \
61+
etoolbox \
62+
xcolor \
63+
auxhook \
64+
bigintcalc \
65+
bitset \
66+
etexcmds \
67+
gettitlestring \
68+
hycolor \
69+
hyperref \
70+
intcalc \
71+
kvdefinekeys \
72+
letltxmacro \
73+
pdfescape \
74+
refcount \
75+
rerunfilecheck \
76+
stringenc \
77+
uniquecounter \
78+
zapfding \
79+
pdftexcmds \
80+
infwarerr \
81+
fancyvrb \
82+
framed \
83+
booktabs \
84+
mdwtools \
85+
grffile \
86+
caption \
87+
sourcecodepro \
88+
amscls \
89+
natbib

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,19 @@ This is the source for the Introduction to Data Science textbook.
88
2. Run RStudio inside the `ubcdsci/intro-to-ds` docker container:
99
- in terminal, navigate to the root of this project repo
1010
- type the following in terminal:
11+
1112
```
12-
docker run --rm -it -p 8787:8787 -v $PWD:/home/rstudio/introduction-to-datascience -e PASSWORD=password ubcdsci/intro-to-ds:v0.1.0
13+
docker-compose up -d
1314
```
15+
If you use this, then when you are done working, type `docker-compose down` to remove the dangling container.
16+
17+
18+
> Alternatively, you can type:
19+
> ```
20+
> docker run --rm -it -p 8787:8787 -v $PWD:/home/rstudio/introduction-to-datascience -e PASSWORD=password ubcdsci/intro-to-ds:v0.1.0
21+
> ```
22+
23+
Next:
1424
- open a web browser and type [http://localhost:8787/](http://localhost:8787/)
1525
- for the username enter `rstudio`
1626
- for the password enter `password` (or whatever you may have changed it to in the `docker run` command above)
@@ -24,6 +34,12 @@ This is the source for the Introduction to Data Science textbook.
2434
2535
> ### Usage without RStudio
2636
> You can use this docker container to edit the files without RStudio using either vim or emacs. This can be done via:
37+
>
38+
> ```
39+
> docker-compose run --rm book-env bash
40+
> ```
41+
>
42+
> or via:
2743
> ```
2844
> docker run --rm -it -v $PWD:/introduction-to-datascience ubcdsci/intro-to-ds /bin/bash
2945
> ```

docker-compose.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
services:
2+
book-env:
3+
image: "ubcdsci/intro-to-ds:v0.6.0-47d5cbf"
4+
ports:
5+
- "8787:8787"
6+
volumes:
7+
- .:/home/rstudio/introduction-to-datascience
8+
environment:
9+
PASSWORD: password
10+

0 commit comments

Comments
 (0)