2016-11-20 14:08:24 -05:00
|
|
|
FROM ubuntu:xenial
|
2018-11-03 03:57:10 -05:00
|
|
|
LABEL maintainer="Andrey Antukh <niwi@niwi.nz>"
|
2016-11-20 14:08:24 -05:00
|
|
|
|
2019-02-15 16:35:49 -05:00
|
|
|
RUN set -ex; \
|
|
|
|
apt-get update && \
|
|
|
|
apt-get install -yq \
|
|
|
|
locales \
|
|
|
|
ca-certificates \
|
|
|
|
wget \
|
|
|
|
; \
|
|
|
|
rm -rf /var/lib/apt/lists/*; \
|
|
|
|
apt-get update -yq && \
|
|
|
|
apt-get install -yq \
|
|
|
|
bash \
|
|
|
|
git \
|
|
|
|
openjdk-8-jdk \
|
|
|
|
rlwrap \
|
|
|
|
build-essential \
|
|
|
|
imagemagick \
|
|
|
|
webp \
|
|
|
|
; \
|
|
|
|
mkdir -p /etc/resolvconf/resolv.conf.d; \
|
|
|
|
echo "nameserver 8.8.8.8" > /etc/resolvconf/resolv.conf.d/tail; \
|
|
|
|
apt-get update -yq; \
|
|
|
|
apt-get install -yq \
|
|
|
|
libbz2-dev liblzma-dev zlib1g-dev libfftw3-dev \
|
|
|
|
libfreetype6-dev libfontconfig1-dev libxt-dev \
|
|
|
|
libexif-dev libjpeg-dev libpng-dev libtiff-dev \
|
|
|
|
libwmf-dev libpango1.0-dev librsvg2-bin librsvg2-dev \
|
|
|
|
libxml2-dev libwebp-dev webp autoconf \
|
|
|
|
; \
|
|
|
|
git clone https://github.com/ImageMagick/ImageMagick.git imagemagick && \
|
|
|
|
cd imagemagick && \
|
|
|
|
git checkout -f 7.0.8-27 && \
|
|
|
|
./configure --prefix=/opt/img && \
|
|
|
|
make -j2 && \
|
|
|
|
make install && \
|
|
|
|
cd .. && \
|
|
|
|
rm -rf ./imagemagick
|
|
|
|
|
2019-02-20 10:46:07 -05:00
|
|
|
ENV NODE_VERSION=8.15.0 \
|
|
|
|
LANG=en_US.UTF-8 \
|
|
|
|
LC_ALL=C.UTF-8 \
|
|
|
|
UXBOX_CONFIG_URL="/api"
|
2016-11-20 14:08:24 -05:00
|
|
|
|
2019-02-15 17:38:14 -05:00
|
|
|
RUN set -ex; \
|
|
|
|
echo "deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main" >> /etc/apt/sources.list; \
|
|
|
|
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -; \
|
|
|
|
apt-get update -yq && \
|
2019-02-15 16:35:49 -05:00
|
|
|
apt-get install -yq \
|
|
|
|
postgresql-9.6 \
|
2019-02-15 17:38:14 -05:00
|
|
|
postgresql-contrib-9.6 \
|
2019-02-16 18:57:15 -05:00
|
|
|
sudo \
|
|
|
|
tmux \
|
|
|
|
vim \
|
2019-02-15 17:38:14 -05:00
|
|
|
;
|
2016-11-20 14:08:24 -05:00
|
|
|
|
2017-01-29 08:02:42 -05:00
|
|
|
COPY files/pg_hba.conf /etc/postgresql/9.6/main/pg_hba.conf
|
|
|
|
# COPY files/postgresql.conf /etc/postgresql/9.5/main/postgresql.conf
|
2016-11-20 14:08:24 -05:00
|
|
|
COPY files/bashrc /root/.bashrc
|
|
|
|
COPY files/vimrc /root/.vimrc
|
|
|
|
|
2019-02-15 17:38:14 -05:00
|
|
|
RUN set -ex; \
|
|
|
|
/etc/init.d/postgresql start \
|
2017-01-29 08:02:42 -05:00
|
|
|
&& createuser -U postgres -sl uxbox \
|
2016-11-20 14:08:24 -05:00
|
|
|
&& createdb -U uxbox uxbox \
|
|
|
|
&& createdb -U uxbox test \
|
|
|
|
&& /etc/init.d/postgresql stop
|
|
|
|
|
|
|
|
EXPOSE 3449
|
|
|
|
EXPOSE 6060
|
|
|
|
EXPOSE 9090
|
|
|
|
|
2019-02-15 17:38:14 -05:00
|
|
|
RUN set -ex; \
|
|
|
|
useradd -m -g users -s /bin/bash uxbox; \
|
2019-02-15 17:09:04 -05:00
|
|
|
passwd uxbox -d; \
|
2019-02-15 17:38:14 -05:00
|
|
|
echo "uxbox ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
|
|
|
|
2016-11-20 14:08:24 -05:00
|
|
|
USER uxbox
|
2019-02-15 17:38:14 -05:00
|
|
|
WORKDIR /home/uxbox
|
2016-11-20 14:08:24 -05:00
|
|
|
|
|
|
|
COPY files/lein /home/uxbox/.local/bin/lein
|
2019-02-15 16:35:49 -05:00
|
|
|
RUN set -ex; \
|
|
|
|
git clone https://github.com/creationix/nvm.git .nvm; \
|
|
|
|
bash -c "source .nvm/nvm.sh && nvm install $NODE_VERSION"; \
|
|
|
|
bash -c "source .nvm/nvm.sh && nvm alias default $NODE_VERSION"; \
|
|
|
|
bash -c "source .nvm/nvm.sh && nvm use default"; \
|
|
|
|
bash -c "/home/uxbox/.local/bin/lein version"
|
2016-11-20 14:08:24 -05:00
|
|
|
|
|
|
|
COPY files/bashrc /home/uxbox/.bashrc
|
|
|
|
COPY files/vimrc /home/uxbox/.vimrc
|
|
|
|
COPY files/start.sh /home/uxbox/.start.sh
|
|
|
|
COPY files/tmux.conf /home/uxbox/.tmux.conf
|
|
|
|
|
|
|
|
CMD /home/uxbox/.start.sh
|