keepass2/Dockerfile

30 lines
843 B
Docker
Raw Normal View History

2016-04-02 20:49:02 +00:00
FROM ubuntu
MAINTAINER Andrey Arapov <andrey.arapov@nixaid.com>
# To avoid problems with Dialog and curses wizards
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update
2016-05-19 11:52:47 +00:00
RUN apt-get install -yq keepass2 xdotool paxctl \
2016-04-02 20:49:02 +00:00
&& rm -rf /var/lib/apt/lists
2016-05-19 11:52:47 +00:00
# make KeePass2 grsec friendly
# m: Disable MPROTECT // grsec: denied RWX mmap of <anonymous mapping>
# (runtime only, since xattrs are not preserved in Docker's final image)
# RUN setfattr -n user.pax.flags -v "m" /usr/bin/mono-sgen
#
# (permanent change, by converting the binary headers PT_GNU_STACK into PT_PAX_FLAGS)
# m: Disable MPROTECT // grsec: denied RWX mmap of <anonymous mapping>
RUN paxctl -c -v -m /usr/bin/mono-sgen
2016-04-02 20:49:02 +00:00
ENV USER user
ENV UID 1000
ENV HOME /home/$USER
RUN useradd -u $UID -m -d $HOME -s /usr/sbin/nologin $USER
WORKDIR $HOME
USER $USER
ENTRYPOINT keepass2