From 8e7f8cf24bc7566df6dd80be183c8839cc7485c5 Mon Sep 17 00:00:00 2001 From: Gerardo Marx Date: Mon, 31 Aug 2020 01:03:18 -0500 Subject: [PATCH] ubuntu focal, latex, emacs and redir --- Dockerfile | 74 ------------------------------ config/.emacs | 4 +- config/.zshrc | 99 ----------------------------------------- docker-compose.yml | 16 ------- docker/emacs/Dockerfile | 31 +++++++++++-- scientific-emacs | 10 +++-- 6 files changed, 36 insertions(+), 198 deletions(-) delete mode 100644 Dockerfile delete mode 100644 config/.zshrc delete mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index fb093ed..0000000 --- a/Dockerfile +++ /dev/null @@ -1,74 +0,0 @@ -# Ubuntu bullseye -FROM ubuntu:bionic -ENV UNAME="scientific-emacs" -MAINTAINER gmarxcc -LABEL version="0.1" -ENV DEBIAN_FRONTEND=noninteractive - -# installing emacs -RUN apt-get update \ - && apt-get -y install emacs - -# installing texlive base with pdflatex utility: -RUN apt-get update \ -&& apt-get install -f -y \ -dvipng \ -ghostscript \ -make \ -latex-cjk-all \ -latex-cjk-common \ -latexmk \ -lcdf-typetools \ -lmodern \ -poppler-utils \ -psutils \ -purifyeps \ -t1utils \ -tex-gyre \ -tex4ht \ -texlive-base \ -texlive-bibtex-extra \ -texlive-binaries \ -texlive-extra-utils \ -texlive-font-utils \ -texlive-fonts-extra \ -texlive-fonts-extra-links \ -texlive-fonts-recommended \ -texlive-formats-extra \ -texlive-lang-all \ -texlive-latex-base \ -texlive-latex-extra \ -texlive-latex-recommended \ -texlive-luatex \ -texlive-metapost \ -texlive-pictures \ -texlive-plain-generic \ -texlive-pstricks \ -texlive-publishers \ -texlive-science \ -texlive-xetex \ -texlive-bibtex-extra - -#installing some usefull apps -RUN apt-get update\ - && apt-get -y install \ - git \ - zsh \ - wget \ - curl \ - apt-utils\ - aspell\ - vim\ - imagemagick\ - perl-tk \ - python3 - -#installing usefull command-line tools -RUN apt-get update\ -&& apt-get -y install \ -csvkit - -# init -ENTRYPOINT ["zsh"] -#ENTRYPOINT [“echo”, “Hello”] -#CMD [“World”] diff --git a/config/.emacs b/config/.emacs index f9fe17e..42f20b0 100644 --- a/config/.emacs +++ b/config/.emacs @@ -173,7 +173,7 @@ (dolist (hook '(org-mode-hook latex-mode-hook tex-mode-hook git-commit-mode-hook)) (add-hook hook (lambda () (flyspell-mode 1)))) ;;(setq ispell-dictionary "en") -(setq ispell-program-name "/usr/local/bin/aspell") +(setq ispell-program-name "/usr/bin/aspell") ;;-+-+-+-+-+-+-+- @@ -186,7 +186,7 @@ '(custom-safe-themes (quote ("3c2f28c6ba2ad7373ea4c43f28fcf2eed14818ec9f0659b1c97d4e89c99e091e" "8d7684de9abb5a770fbfd72a14506d6b4add9a7d30942c6285f020d41d76e0fa" "990e24b406787568c592db2b853aa65ecc2dcd08146c0d22293259d400174e37" "bf387180109d222aee6bb089db48ed38403a1e330c9ec69fe1f52460a8936b66" default))) - '(package-selected-packages (quote (use-package))) + '(package-selected-packages (quote (org-pdftools use-package))) '(pdf-tools-handle-upgrades nil)) (custom-set-faces ;; custom-set-faces was added by Custom. diff --git a/config/.zshrc b/config/.zshrc deleted file mode 100644 index 8736d89..0000000 --- a/config/.zshrc +++ /dev/null @@ -1,99 +0,0 @@ -# If you come from bash you might have to change your $PATH. -# export PATH=$HOME/bin:/usr/local/bin:$PATH - -# Path to your oh-my-zsh installation. -export ZSH="/root/.oh-my-zsh" - -# Set name of the theme to load --- if set to "random", it will -# load a random theme each time oh-my-zsh is loaded, in which case, -# to know which specific one was loaded, run: echo $RANDOM_THEME -# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes -ZSH_THEME="robbyrussell" - -# Set list of themes to pick from when loading at random -# Setting this variable when ZSH_THEME=random will cause zsh to load -# a theme from this variable instead of looking in $ZSH/themes/ -# If set to an empty array, this variable will have no effect. -# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) - -# Uncomment the following line to use case-sensitive completion. -# CASE_SENSITIVE="true" - -# Uncomment the following line to use hyphen-insensitive completion. -# Case-sensitive completion must be off. _ and - will be interchangeable. -# HYPHEN_INSENSITIVE="true" - -# Uncomment the following line to disable bi-weekly auto-update checks. -# DISABLE_AUTO_UPDATE="true" - -# Uncomment the following line to automatically update without prompting. -# DISABLE_UPDATE_PROMPT="true" - -# Uncomment the following line to change how often to auto-update (in days). -# export UPDATE_ZSH_DAYS=13 - -# Uncomment the following line if pasting URLs and other text is messed up. -# DISABLE_MAGIC_FUNCTIONS="true" - -# Uncomment the following line to disable colors in ls. -# DISABLE_LS_COLORS="true" - -# Uncomment the following line to disable auto-setting terminal title. -# DISABLE_AUTO_TITLE="true" - -# Uncomment the following line to enable command auto-correction. -# ENABLE_CORRECTION="true" - -# Uncomment the following line to display red dots whilst waiting for completion. -# COMPLETION_WAITING_DOTS="true" - -# Uncomment the following line if you want to disable marking untracked files -# under VCS as dirty. This makes repository status check for large repositories -# much, much faster. -# DISABLE_UNTRACKED_FILES_DIRTY="true" - -# Uncomment the following line if you want to change the command execution time -# stamp shown in the history command output. -# You can set one of the optional three formats: -# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" -# or set a custom format using the strftime function format specifications, -# see 'man strftime' for details. -# HIST_STAMPS="mm/dd/yyyy" - -# Would you like to use another custom folder than $ZSH/custom? -# ZSH_CUSTOM=/path/to/new-custom-folder - -# Which plugins would you like to load? -# Standard plugins can be found in $ZSH/plugins/ -# Custom plugins may be added to $ZSH_CUSTOM/plugins/ -# Example format: plugins=(rails git textmate ruby lighthouse) -# Add wisely, as too many plugins slow down shell startup. -plugins=(git) - -source $ZSH/oh-my-zsh.sh - -# User configuration - -# export MANPATH="/usr/local/man:$MANPATH" - -# You may need to manually set your language environment -# export LANG=en_US.UTF-8 - -# Preferred editor for local and remote sessions -# if [[ -n $SSH_CONNECTION ]]; then -# export EDITOR='vim' -# else -# export EDITOR='mvim' -# fi - -# Compilation flags -# export ARCHFLAGS="-arch x86_64" - -# Set personal aliases, overriding those provided by oh-my-zsh libs, -# plugins, and themes. Aliases can be placed here, though oh-my-zsh -# users are encouraged to define aliases within the ZSH_CUSTOM folder. -# For a full list of active aliases, run `alias`. -# -# Example aliases -# alias zshconfig="mate ~/.zshrc" -# alias ohmyzsh="mate ~/.oh-my-zsh" diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index c3bdea6..0000000 --- a/docker-compose.yml +++ /dev/null @@ -1,16 +0,0 @@ -version: '3.8' -services: - this_emacs: - container_name: scientific-emacs - build: docker/emacs - volumes: - #- ./config:/home/emacs/.emacs.d - # - ./data:/home - - /tmp/.X11-unix:/tmp/.X11-unix - #- $HOME/.Xauthority:/root/.Xauthority - environment: - DISPLAY: $DISPLAY - tty: true - stdin_open: true - entrypoint: bin/bash -# redis service diff --git a/docker/emacs/Dockerfile b/docker/emacs/Dockerfile index 4bd4907..6e94901 100644 --- a/docker/emacs/Dockerfile +++ b/docker/emacs/Dockerfile @@ -1,10 +1,35 @@ # Ubuntu -FROM ubuntu:latest +FROM ubuntu:focal ENV UNAME="scientific-emacs" MAINTAINER gmarxcc LABEL version="0.1" - +ARG DEBIAN_FRONTEND=noninteractive +ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 # installing emacs RUN apt-get update \ - && apt-get install -y emacs +&& apt-get install -y emacs + +# installing texlive base with pdflatex utility: +RUN apt-get -y install \ +texlive-latex-base \ +texlive-latex-recommended \ +texlive-pictures \ +texlive-science \ +texlive-bibtex-extra + +# useful apps +RUN apt-get -y install \ +git \ +wget \ +curl \ +aspell \ +vim \ +python3 \ +zsh + +# oh-my-zshell +RUN sh -c "$(wget -O- https://raw.githubusercontent.com/deluan/zsh-in-docker/master/zsh-in-docker.sh)" -- \ + -p git -p ssh-agent +# entrypoint +ENTRYPOINT ["zsh"] diff --git a/scientific-emacs b/scientific-emacs index 1ffef11..c281f67 100755 --- a/scientific-emacs +++ b/scientific-emacs @@ -3,8 +3,10 @@ ip=$(ifconfig en0 | grep inet | awk '$1=="inet" {print $2}') xhost + $ip echo 'running scientific-emacs:0.1' -docker run --rm -it -v ~/lwc/docker-containers/scientific-emacs/config:/root \ +docker run --rm -it \ + -v `pwd`/config:/root \ -v `pwd`:/home\ - -e DISPLAY=$ip:0 \ - -v /tmp/.X11-unix:/tmp/.X11-unix \ - gmarxcc/scientific-emacs:0.1 + -e DISPLAY=$ip:0 \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + --link this_redis \ + gmarxcc/scientific-emacs:0.1