Skip to content

Commit 51caf9e

Browse files
committedMar 8, 2020
devcontainer
1 parent a63f953 commit 51caf9e

File tree

3 files changed

+57
-2
lines changed

3 files changed

+57
-2
lines changed
 

‎.devcontainer/Dockerfile

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
FROM ubuntu:latest
2+
3+
# Avoid warnings by switching to noninteractive
4+
ENV DEBIAN_FRONTEND=noninteractive
5+
6+
ARG USERNAME=vscode
7+
ARG USER_UID=1000
8+
ARG USER_GID=$USER_UID
9+
ARG INSTALL_ZSH="true"
10+
11+
ARG COMMON_SCRIPT_SOURCE="https://raw.githubusercontent.com/microsoft/vscode-dev-containers/master/script-library/common-debian.sh"
12+
ARG COMMON_SCRIPT_SHA="dev-mode"
13+
RUN echo "APT::Acquire::Queue-Mode "access"; APT::Acquire::Retries 3; " > /etc/apt/apt.conf.d/99parallel && \
14+
export DEBIAN_FRONTEND=noninteractive && \
15+
apt-get update && apt-get install -y --no-install-recommends tzdata gnupg ca-certificates curl unzip apt-utils build-essential software-properties-common && \
16+
ln -fs /usr/share/zoneinfo/Etc/UTC /etc/localtime && \
17+
dpkg-reconfigure --frontend noninteractive tzdata && \
18+
apt-get clean -y
19+
20+
# Configure apt and install packages
21+
RUN apt-get update \
22+
&& apt-get -y install --no-install-recommends apt-utils dialog wget ca-certificates 2>&1 \
23+
#
24+
# Verify git, common tools / libs installed, add/modify non-root user, optionally install zsh
25+
&& wget -q -O /tmp/common-setup.sh $COMMON_SCRIPT_SOURCE \
26+
&& if [ "$COMMON_SCRIPT_SHA" != "dev-mode" ]; then echo "$COMMON_SCRIPT_SHA /tmp/common-setup.sh" | sha256sum -c - ; fi \
27+
&& /bin/bash /tmp/common-setup.sh "$INSTALL_ZSH" "$USERNAME" "$USER_UID" "$USER_GID" \
28+
&& rm /tmp/common-setup.sh
29+
30+
RUN apt-get install -y --no-install-recommends \
31+
texlive-full python-pygments graphviz
32+
33+
ENV PATH=$PATH
34+
35+
RUN apt-get autoremove -y \
36+
&& apt-get clean -y \
37+
&& rm -rf /var/lib/apt/lists/*
38+
39+
USER ${USER_UID}:${USER_GID}
40+
41+
# Switch back to dialog for any ad-hoc use of apt-get
42+
ENV DEBIAN_FRONTEND=dialog

‎.devcontainer/devcontainer.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "LaTeX",
3+
"dockerFile": "Dockerfile",
4+
"settings": {
5+
"terminal.integrated.shell.linux": "/bin/zsh",
6+
},
7+
"remoteUser": "vscode",
8+
"extensions": [
9+
"james-yu.latex-workshop",
10+
]
11+
}

‎Makefile.base

+4-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@ pdf: $(PDFS)
2222
@echo "== Compiling $*..."
2323
@echo ""
2424
mkdir -p $(PDF_DIR)
25-
[[ ! -e $(PDF_DIR)/media ]] && ln -s $(shell pwd)/media/ $(PDF_DIR)/media || true
26-
[[ ! -e $(PDF_DIR)/$*.tex ]] && ln -s $(shell pwd)/$*.tex $(PDF_DIR)/$*.tex || true
25+
echo $$SHELL
26+
echo $(shell pwd)
27+
[ ! -e $(PDF_DIR)/media ] && ln -s $(shell pwd)/media/ $(PDF_DIR)/media || true
28+
[ ! -e $(PDF_DIR)/$*.tex ] && ln -s $(shell pwd)/$*.tex $(PDF_DIR)/$*.tex || true
2729
cd $(PDF_DIR) && $(LATEX) $(LATEX_ARGS) $*
2830
cd $(PDF_DIR) && $(LATEX) $(LATEX_ARGS) $*
2931
# https://askubuntu.com/questions/113544/how-can-i-reduce-the-file-size-of-a-scanned-pdf-file

0 commit comments

Comments
 (0)
Please sign in to comment.