2019-09-17 11:14:49 -05:00
|
|
|
FROM ubuntu:bionic
|
2018-11-03 03:57:10 -05:00
|
|
|
LABEL maintainer="Andrey Antukh <niwi@niwi.nz>"
|
2016-11-20 14:08:24 -05:00
|
|
|
|
2019-06-03 09:53:31 -05:00
|
|
|
ARG EXTERNAL_UID=1000
|
2019-09-20 10:31:03 -05:00
|
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
2019-06-03 09:53:31 -05:00
|
|
|
|
2020-01-11 10:59:31 -05:00
|
|
|
ENV NODE_VERSION=v12.14.1 \
|
2019-12-18 04:54:28 -05:00
|
|
|
CLOJURE_VERSION=1.10.1.492 \
|
2019-06-03 09:53:31 -05:00
|
|
|
LANG=en_US.UTF-8 \
|
2019-06-05 03:41:12 -05:00
|
|
|
LC_ALL=C.UTF-8
|
2019-06-03 09:53:31 -05:00
|
|
|
|
2019-02-15 16:35:49 -05:00
|
|
|
RUN set -ex; \
|
|
|
|
apt-get update && \
|
|
|
|
apt-get install -yq \
|
|
|
|
locales \
|
2019-09-17 11:14:49 -05:00
|
|
|
gnupg2 \
|
2019-02-15 16:35:49 -05:00
|
|
|
ca-certificates \
|
|
|
|
wget \
|
2019-06-05 05:07:01 -05:00
|
|
|
sudo \
|
|
|
|
tmux \
|
|
|
|
vim \
|
|
|
|
curl \
|
|
|
|
zsh \
|
2019-02-15 16:35:49 -05:00
|
|
|
bash \
|
|
|
|
git \
|
|
|
|
rlwrap \
|
|
|
|
build-essential \
|
|
|
|
imagemagick \
|
|
|
|
webp \
|
|
|
|
; \
|
2019-06-05 05:07:01 -05:00
|
|
|
rm -rf /var/lib/apt/lists/*;
|
2016-11-20 14:08:24 -05:00
|
|
|
|
2019-02-15 17:38:14 -05:00
|
|
|
RUN set -ex; \
|
2019-09-17 11:14:49 -05:00
|
|
|
mkdir -p /etc/resolvconf/resolv.conf.d; \
|
|
|
|
echo "nameserver 8.8.8.8" > /etc/resolvconf/resolv.conf.d/tail; \
|
|
|
|
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0xB1998361219BD9C9; \
|
|
|
|
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -; \
|
|
|
|
echo "deb http://repos.azulsystems.com/ubuntu stable main" >> /etc/apt/sources.list.d/zulu.list; \
|
|
|
|
echo "deb http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main" >> /etc/apt/sources.list.d/postgresql.list;
|
|
|
|
|
|
|
|
|
|
|
|
RUN set -ex; \
|
|
|
|
apt-get -qq update; \
|
|
|
|
apt-get install -qqy zulu-12; \
|
|
|
|
apt-get install -qqy \
|
2019-11-22 12:03:54 -05:00
|
|
|
postgresql-12 \
|
|
|
|
postgresql-contrib-12 \
|
2019-06-05 05:07:01 -05:00
|
|
|
;\
|
|
|
|
rm -rf /var/lib/apt/lists/*;
|
|
|
|
|
2019-11-22 12:03:54 -05:00
|
|
|
COPY files/pg_hba.conf /etc/postgresql/12/main/pg_hba.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; \
|
2019-06-05 05:07:01 -05:00
|
|
|
/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; \
|
2019-06-05 05:07:01 -05:00
|
|
|
useradd -m -g users -s /bin/zsh -u $EXTERNAL_UID 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
|
|
|
|
|
2019-06-03 09:53:31 -05:00
|
|
|
RUN set -ex; \
|
2019-06-10 18:01:55 -05:00
|
|
|
wget "https://download.clojure.org/install/linux-install-$CLOJURE_VERSION.sh"; \
|
|
|
|
chmod +x "linux-install-$CLOJURE_VERSION.sh"; \
|
|
|
|
"./linux-install-$CLOJURE_VERSION.sh"; \
|
|
|
|
rm -rf "linux-install-$CLOJURE_VERSION.sh"
|
2019-06-03 09:53:31 -05:00
|
|
|
|
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
|
|
|
|
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"; \
|
2019-06-03 09:53:31 -05:00
|
|
|
bash -c "source .nvm/nvm.sh && nvm use default";
|
2016-11-20 14:08:24 -05:00
|
|
|
|
|
|
|
COPY files/bashrc /home/uxbox/.bashrc
|
2019-06-05 03:41:12 -05:00
|
|
|
COPY files/zshrc /home/uxbox/.zshrc
|
2016-11-20 14:08:24 -05:00
|
|
|
COPY files/vimrc /home/uxbox/.vimrc
|
2019-12-18 04:54:28 -05:00
|
|
|
COPY files/start-tmux.sh /home/uxbox/start-tmux.sh
|
2016-11-20 14:08:24 -05:00
|
|
|
COPY files/tmux.conf /home/uxbox/.tmux.conf
|
2019-06-03 09:53:31 -05:00
|
|
|
COPY files/entrypoint.sh /home/uxbox/
|
2019-09-20 10:31:03 -05:00
|
|
|
COPY files/init.sh /home/uxbox/
|
2016-11-20 14:08:24 -05:00
|
|
|
|
2019-06-05 03:41:12 -05:00
|
|
|
ENTRYPOINT ["zsh", "/home/uxbox/entrypoint.sh"]
|
2019-12-18 04:54:28 -05:00
|
|
|
CMD ["/home/uxbox/init.sh"]
|