Skip to content

Commit

Permalink
updated dockerfile and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ledwindra authored Sep 7, 2021
1 parent acc438e commit 95a3a4f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y wget

# you need to have a stata installer named stata.tar.gz on your machine
# URL can be from Dropbox
ARG URL
ENV URL=${URL}
RUN wget -O /home/stata.tar.gz ${URL}
Expand Down Expand Up @@ -37,7 +38,6 @@ FROM jupyter/base-notebook:latest
USER root
RUN apt-get update && \
apt-get install -y autoconf automake build-essential git libncurses5 libtool make pkg-config tcsh vim zlib1g-dev && \
apt-get install -y texlive-xetex texlive-fonts-recommended texlive-latex-recommended && \
wget http://archive.ubuntu.com/ubuntu/pool/main/libp/libpng/libpng_1.2.54.orig.tar.xz && \
tar xvf libpng_1.2.54.orig.tar.xz && \
cd libpng-1.2.54 && \
Expand All @@ -46,6 +46,7 @@ RUN apt-get update && \
make -j8 && \
make install && \
ldconfig
RUN apt-get install -y texlive-xetex texlive-fonts-recommended texlive-latex-recommended
COPY --from=0 /usr/local/stata /usr/local/stata
ENV PATH="/usr/local/stata:$PATH"
RUN pip install stata_kernel && python -m stata_kernel.install
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

```bash
# replace all values
# only executed once
docker build -t stata "https://github.com/ledwindra/docker-stata.git#main" \
--build-arg URL="URL TO YOUR STATA INSTALLER" \
--build-arg SERIAL="STATA SERIAL NUMBER" \
Expand All @@ -11,7 +12,13 @@ docker build -t stata "https://github.com/ledwindra/docker-stata.git#main" \
--build-arg LAST="LAST NAME"

# run jupyter and copy tokens if needed
# unless you delete the container (stata), you only need to execute the following command
docker run -p 8888:8888 --name=stata stata:latest

# check whether stata container is active
docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
2d70f687536f stata:latest "tini -g -- jupyter …" 4 minutes ago Up 4 minutes 0.0.0.0:8888->8888/tcp, :::8888->8888/tcp stata
```

# Token
Expand Down

0 comments on commit 95a3a4f

Please sign in to comment.