-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathDockerfile.bindings
46 lines (32 loc) · 1.5 KB
/
Dockerfile.bindings
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
FROM ubuntu@sha256:72297848456d5d37d1262630108ab308d3e9ec7ed1c3286a32fe09856619a782
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update -q && apt-get install -y git curl xz-utils tar gpg build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev \
libncursesw5-dev tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev \
libffi8 libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5 pkg-config
RUN groupadd -g 1001 asdf
RUN adduser -u 1001 --gid 1001 --shell /bin/bash --home /asdf --disabled-password asdf
ENV PATH="${PATH}:/asdf/.asdf/shims:/asdf/.asdf/bin"
USER asdf
RUN git clone --depth 1 https://github.com/asdf-vm/asdf.git $HOME/.asdf && \
echo '. $HOME/.asdf/asdf.sh' >> $HOME/.bashrc && \
echo '. $HOME/.asdf/asdf.sh' >> $HOME/.profile
RUN . ~/.bashrc
# YOLO
RUN curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
ENV PATH="${PATH}:/asdf/.ghcup/bin"
RUN asdf plugin add nodejs && \
asdf plugin add golang && \
asdf plugin add shellcheck && \
asdf plugin add yarn && \
asdf plugin add python && \
asdf plugin add rust
COPY .tool-versions .
RUN asdf install && \
# Pre-fetch Haskell dependencies as they take the longest time by far
# TODO(anton): run the proto-generate.sh script during the build time to
# pre-fecth all dependencies. I attempted to do so but ran into issues
# with Yarn
cabal install proto-lens-protoc-0.8.0.1 ghc-source-gen-0.4.5.0
WORKDIR /src
CMD ["./dev/docker-entrypoint.sh"]