Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Dockerfile #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 11 additions & 27 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,33 +1,17 @@
FROM ubuntu:18.04
MAINTAINER [email protected]

ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && \
apt-get install -y apt-utils && \
apt-get install -y locales && \
apt-get install -y tzdata && \
apt-get install -y curl && \
apt-get install -y sudo && \
apt-get install -y lsb && \
apt-get install -y libqt5core5a libqt5gui5 libqt5network5 libqt5widgets5 libqt5printsupport5 libqt5svg5 libqt5widgets5 && \
apt-get install -y libnss3-tools libxerces-c3.2 libxalan-c111 && \
apt-get install -y fonts-liberation python-nautilus libzip4 libssl1.0.0 && \
rm -rf /var/lib/apt/lists/* && \
groupadd -g 1000 openeid && \
useradd -u 1000 -g 1000 -m openeid && \
echo "openeid ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers

RUN localedef -i et_EE -c -f UTF-8 -A /usr/share/locale/locale.alias et_EE.UTF-8 && \
ln -sf /usr/share/zoneinfo/Europe/Tallinn /etc/localtime

ENV LANG et_EE.UTF-8

RUN apt-get update && apt-get install curl sudo lsb-release gnupg pcscd -y
RUN useradd -m openeid
RUN echo "openeid ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
COPY docker-entrypoint.sh /entrypoint.sh
RUN chmod 755 /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]

USER 1000:1000
WORKDIR /home/openeid
USER openeid

RUN curl -s https://installer.id.ee/media/install-scripts/install-open-eid.sh | sed 's/sudo apt-get install/sudo apt-get install -y/' | bash -x -s \
&& sudo rm -rf /var/lib/apt/lists/*
RUN curl -s https://installer.id.ee/media/install-scripts/install-open-eid.sh | sed 's/sudo apt-get install/sudo apt-get install -y/' | bash -s \
&& sudo rm -rf /var/lib/apt/lists/* \
&& sudo apt-get remove --purge apt-transport-https \
&& sudo apt-get autoremove && sudo apt-get clean
WORKDIR /home/openeid
VOLUME [ "/home/openeid" ]
ENTRYPOINT ["/entrypoint.sh"]