update chrome and mutt

Signed-off-by: Jess Frazelle <jess@mesosphere.com>
This commit is contained in:
Jess Frazelle 2016-04-05 10:12:37 -07:00
parent 9ccf93425b
commit 6e563ac528
No known key found for this signature in database
GPG Key ID: 18F3685C0022BFF3
5 changed files with 62 additions and 74 deletions

View File

@ -1,49 +1,49 @@
# Run Chrome in a container
#
# docker run -it \
# --net host \ # may as well YOLO
# --cpuset-cpus 0 \ # control the cpu
# --memory 512mb \ # max memory it can use
# -v /tmp/.X11-unix:/tmp/.X11-unix \ # mount the X11 socket
# -e DISPLAY=unix$DISPLAY \
# -v $HOME/Downloads:/root/Downloads \
# -v $HOME/.config/google-chrome/:/data \ # if you want to save state
# --device /dev/snd \ # so we have sound
# -v /dev/shm:/dev/shm \
# --name chrome \
# jess/chrome:beta
#
# Base docker image
FROM debian:jessie
FROM debian:sid
MAINTAINER Jessica Frazelle <jess@docker.com>
ADD https://dl.google.com/linux/direct/google-talkplugin_current_amd64.deb /src/google-talkplugin_current_amd64.deb
ADD https://dl.google.com/linux/direct/google-chrome-beta_current_amd64.deb /src/google-chrome-beta_current_amd64.deb
# Install Chrome
RUN echo 'deb http://httpredir.debian.org/debian testing main' >> /etc/apt/sources.list && \
apt-get update && apt-get install -y \
ca-certificates \
fonts-liberation \
fonts-roboto \
gconf-service \
curl \
hicolor-icon-theme \
libappindicator1 \
libasound2 \
libcanberra-gtk-module \
libcurl3 \
libexif-dev \
libfontconfig1 \
libfreetype6 \
libgconf-2-4 \
libgl1-mesa-dri \
libgl1-mesa-glx \
libnspr4 \
libnss3 \
libpango1.0-0 \
libv4l-0 \
libxss1 \
libxtst6 \
lsb-base \
strace \
wget \
xdg-utils \
-t testing \
fonts-symbola \
--no-install-recommends && \
dpkg -i '/src/google-chrome-beta_current_amd64.deb' && \
dpkg -i '/src/google-talkplugin_current_amd64.deb' \
--no-install-recommends \
&& curl -sSL https://dl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google.list \
&& apt-get update && apt-get install -y \
google-chrome-beta \
--no-install-recommends \
&& dpkg -i '/src/google-talkplugin_current_amd64.deb' \
&& apt-get purge --auto-remove -y curl \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /src/*.deb
COPY local.conf /etc/fonts/local.conf
# Autorun chrome
ENTRYPOINT [ "/usr/bin/google-chrome" ]
ENTRYPOINT [ "google-chrome" ]
CMD [ "--user-data-dir=/data" ]

View File

@ -20,41 +20,25 @@ MAINTAINER Jessica Frazelle <jess@docker.com>
ADD https://dl.google.com/linux/direct/google-talkplugin_current_amd64.deb /src/google-talkplugin_current_amd64.deb
ADD https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb /src/google-chrome-stable_current_amd64.deb
# Install Chrome
RUN echo 'deb http://httpredir.debian.org/debian testing main' >> /etc/apt/sources.list && \
apt-get update && apt-get install -y \
ca-certificates \
fonts-liberation \
fonts-roboto \
gconf-service \
curl \
hicolor-icon-theme \
libappindicator1 \
libasound2 \
libcanberra-gtk-module \
libcurl3 \
libexif-dev \
libfontconfig1 \
libfreetype6 \
libgconf-2-4 \
libgl1-mesa-dri \
libgl1-mesa-glx \
libnspr4 \
libnss3 \
libpango1.0-0 \
libv4l-0 \
libxss1 \
libxtst6 \
lsb-base \
strace \
wget \
xdg-utils \
-t testing \
fonts-symbola \
--no-install-recommends && \
dpkg -i '/src/google-chrome-stable_current_amd64.deb' && \
dpkg -i '/src/google-talkplugin_current_amd64.deb' \
--no-install-recommends \
&& curl -sSL https://dl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google.list \
&& apt-get update && apt-get install -y \
google-chrome-stable \
--no-install-recommends \
&& dpkg -i '/src/google-talkplugin_current_amd64.deb' \
&& apt-get purge --auto-remove -y curl \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /src/*.deb

View File

@ -22,7 +22,7 @@ my_hdr X-Hack-The-Planet: Yes
my_hdr X-Acid-Burn: Yes
# TODO figure out how to use the sidebar more effectively :)
set sidebar_visible = no
#set sidebar_visible = no
# Tianon keybindings and settings, because he's special.
bind pager <up> previous-line

View File

@ -8,30 +8,29 @@
# --name mutt \
# jess/mutt
#
FROM debian:sid
FROM alpine:latest
MAINTAINER Jessica Frazelle <jess@docker.com>
RUN groupadd -g 1000 user \
&& useradd --create-home -d /home/user -g user -u 1000 user
RUN addgroup -g 1000 user \
&& adduser -D -h /home/user -G user -u 1000 user
RUN apt-get update && apt-get install -y \
RUN apk --update add \
ca-certificates \
elinks \
git \
libsasl2-modules \
gnupg \
lynx \
mutt-dbg \
mutt-patched \
vim-nox \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
mutt \
mutt-doc \
vim \
&& rm -rf /var/cache/apk/*
# a browser is necessary!
ENV BROWSER lynx
USER user
ENV HOME /home/user
ENV TERM xterm-256color
ENV TERM xterm
RUN mkdir -p $HOME/.mutt/cache/headers $HOME/.mutt/cache/bodies \
&& touch $HOME/.mutt/certificates
@ -47,4 +46,4 @@ COPY .mutt $HOME/.mutt
ENTRYPOINT ["/entrypoint.sh"]
CMD ["mutt-patched", "-F", "~/.mutt/muttrc"]
CMD ["mutt", "-F", "~/.mutt/muttrc"]

View File

@ -1,7 +1,7 @@
#!/bin/bash
#!/bin/sh
set -e
if [[ -z "$GMAIL" ]]; then
if [ -z "$GMAIL" ]; then
echo >&2 'error: missing GMAIL environment variable'
echo >&2 ' try running again with -e GMAIL=your-email@gmail.com'
echo >&2 ' optionally, you can also specify -e GMAIL_PASS'
@ -10,19 +10,19 @@ if [[ -z "$GMAIL" ]]; then
exit 1
fi
if [[ -z "$GMAIL_NAME" ]]; then
if [ -z "$GMAIL_NAME" ]; then
GMAIL_NAME="$GMAIL"
fi
if [[ -z "$GMAIL_FROM" ]]; then
if [ -z "$GMAIL_FROM" ]; then
GMAIL_FROM="$GMAIL"
fi
if [[ -z "$IMAP_SERVER" ]]; then
if [ -z "$IMAP_SERVER" ]; then
IMAP_SERVER="imap.gmail.com:993"
fi
if [[ -z "$SMTP_SERVER" ]]; then
if [ -z "$SMTP_SERVER" ]; then
SMTP_SERVER="smtp.gmail.com"
fi
@ -33,12 +33,17 @@ sed -i "s/%GMAIL_FROM%/$GMAIL_FROM/g" "$HOME/.mutt/muttrc"
sed -i "s/%IMAP_SERVER%/$IMAP_SERVER/g" "$HOME/.mutt/muttrc"
sed -i "s/%SMTP_SERVER%/$SMTP_SERVER/g" "$HOME/.mutt/muttrc"
if [[ -d "$HOME/.gnupg" ]]; then
if [ -d "$HOME/.gnupg" ]; then
# sane gpg settings to be a good encryption
# social citizen of the world
{
echo
echo 'source /usr/share/doc/mutt/examples/gpg.rc'
if [ -f "/usr/share/doc/mutt/samples/gpg.rc" ]; then
echo 'source /usr/share/doc/mutt/samples/gpg.rc'
fi
if [ -f "/usr/share/doc/mutt/examples/gpg.rc" ]; then
echo 'source /usr/share/doc/mutt/examples/gpg.rc'
fi
if [[ ! -z "$GPG_ID" ]]; then
echo "set pgp_sign_as = $GPG_ID"
fi
@ -58,7 +63,7 @@ if [[ -d "$HOME/.gnupg" ]]; then
} >> "$HOME/.mutt/muttrc"
fi
if [[ -e "$HOME/.muttrc.local" ]]; then
if [ -e "$HOME/.muttrc.local" ]; then
echo "source $HOME/.muttrc.local" >> "$HOME/.mutt/muttrc"
fi