forked from tfoldi/tableau-server-docker
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDockerfile.2019-1-1
63 lines (51 loc) · 2.26 KB
/
Dockerfile.2019-1-1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Run `make run` to get things started
# our image is centos default image with systemd
FROM centos/systemd
ARG TABLEAU_VERSION
ENV TABLEAU_VERSION $TABLEAU_VERSION
ARG proxy
ENV http_proxy $proxy
ENV https_proxy $proxy
ENV NO_PROXY "127.0.0.1,localhost"
ARG TSM_PASSWORD
ENV TSM_PASSWORD ${TSM_PASSWORD}
ARG ADMIN_PASSWORD
ENV ADMIN_PASSWORD ${ADMIN_PASSWORD}
MAINTAINER "Fabien ANTOINE" <[email protected]>
# this is the version what we're building
ENV LANG=en_US.UTF-8
# make systemd dbus visible
VOLUME /sys/fs/cgroup /run /tmp /var/opt/tableau
COPY download/tableau-tabcmd-${TABLEAU_VERSION}.noarch.rpm /var/tmp/
COPY download/tableau-server-${TABLEAU_VERSION}.x86_64.rpm /var/tmp/
COPY download/vertica-client-9.1.1-0.x86_64.rpm /var/tmp
# Install core bits and their deps:w
RUN rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm && \
yum install -y iproute curl sudo vim && \
adduser tsm && \
(echo tsm:${TSM_PASSWORD} | chpasswd) && \
(echo 'tsm ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/tsm) && \
mkdir -p /run/systemd/system /opt/tableau/docker_build && \
yum install -y \
/var/tmp/tableau-server-tabcmd-${TABLEAU_VERSION}.noarch.rpm \
/var/tmp/tableau-server-${TABLEAU_VERSION}.x86_64.rpm \
/var/tmp/vertica-client-9.1.1-0.x86_64.rpm &&\
rm -rf /var/tmp/*rpm
RUN groupadd tableau && \
groupadd tsmadmin && \
usermod tsm -aG tableau,tsmadmin && \
useradd --system --comment "Tableau Server" --shell /bin/bash --create-home --home-dir /var/opt/tableau -g tableau tableau && \
chown tableau /var/opt/tableau/.
RUN mkdir -p /etc/systemd/system/default.target.wants \
/etc/security/limits.d/ \
/etc/systemd/logind.conf.d/
COPY config/* /opt/tableau/docker_build/
RUN cp /opt/tableau/docker_build/tableau_server_install.service /etc/systemd/system/
RUN cp /opt/tableau/docker_build/99-tableau_server_limitsd.conf /etc/security/limits.d/
RUN cp /opt/tableau/docker_build/tableau_server_logind.conf /etc/systemd/logind.conf.d/
RUN cp /opt/tableau/docker_build/[email protected] /etc/systemd/system/user@`id -u tableau`.service
RUN systemctl enable tableau_server_install
RUN systemctl enable user@`id -u tableau`.service
# Expose TSM and Gateway ports
EXPOSE 80 8850
CMD /sbin/init