asdf_container/Dockerfile

52 lines
1.7 KiB
Docker
Raw Normal View History

2023-07-19 12:56:16 +12:00
FROM ubuntu:latest
ENV DEBIAN_FRONTEND="noninteractive"
# Install basic dependencies
RUN apt-get -q -y update && \
apt-get -q -y --no-install-recommends install autoconf automake \
bash build-essential bzip2 ca-certificates curl dpkg-dev file \
g++ gcc git-core imagemagick libbz2-dev libc6-dev libdb-dev libevent-dev \
libffi-dev libgdbm-dev libglib2.0-dev libgmp-dev libjpeg-dev libkrb5-dev \
liblzma-dev libmagickcore-dev libmagickwand-dev libmaxminddb-dev \
libncurses-dev libncurses5-dev libncursesw5-dev libpng-dev libpq-dev \
libreadline-dev libsctp-dev libsqlite3-dev libssl-dev libtool libwebp-dev \
libxml2-dev libxslt-dev libyaml-dev locales make make mercurial patch python3 \
unixodbc-dev unzip wget xz-utils zlib1g-dev zsh gnupg inotify-tools less \
2023-10-12 09:19:15 +13:00
postgresql-client openssh-client direnv libmnl-dev bc m4 cmake cpio rsync flex \
texinfo help2man pkgconf libglfw3 libglfw3-dev libglew2.2 libglew-dev \
libcairo2-dev && \
2023-10-12 08:30:49 +13:00
apt-get -q -y clean
2023-07-19 12:56:16 +12:00
2023-07-19 19:03:39 +12:00
RUN locale-gen en_NZ.UTF-8
ENV LANG en_NZ.UTF-8
ENV LANGUAGE en_NZ:en
ENV LC_ALL en_NZ.UTF-8
2023-07-19 12:56:16 +12:00
COPY asdf /usr/local/bin
RUN chmod 755 /usr/local/bin/asdf
COPY asdf_install /usr/local/bin
RUN chmod 755 /usr/local/bin/asdf_install
2023-07-19 12:56:16 +12:00
2023-07-19 19:19:43 +12:00
ENV HOME=/root
2023-07-19 12:56:16 +12:00
WORKDIR $HOME
# Install ASDF
2023-07-20 14:17:56 +12:00
ARG ASDF_VERSION=0.12.0
2023-07-19 12:56:16 +12:00
RUN git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v${ASDF_VERSION} && \
echo '\nsource $HOME/.asdf/asdf.sh' >> ~/.bashrc && \
echo '\nsource $HOME/.asdf/asdf.sh' >> ~/.zshrc
# Generate an entrypoint.sh
RUN echo '#!/bin/bash' > /entrypoint.sh && \
echo 'source ~/.asdf/asdf.sh' >> /entrypoint.sh && \
echo 'eval "$(direnv hook bash)"' >> /entrypoint.sh && \
echo 'exec "$@"' >> /entrypoint.sh && \
chmod 755 /entrypoint.sh
ENTRYPOINT [ "/entrypoint.sh" ]
CMD ["zsh"]