-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
39 lines (31 loc) · 1.36 KB
/
Dockerfile
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
FROM emilgoldsmith/unsafe-dev-container:node-18-latest
ENV ELM_VERSION=0.19.1
ENV ELM_TEST_VERSION 0.19.1-revision7
ENV ELM_FORMAT_VERSION 0.8.4
ENV ELM_VERIFY_EXAMPLES_VERSION 5.0.0
ENV ELM_DOC_PREVIEW_VERSION 5.0.5
ENV ELM_ANALYSE_VERSION 0.16.5
# Taken from https://github.com/elm/compiler/blob/master/installers/linux/README.md
RUN curl -L -o elm.gz https://github.com/elm/compiler/releases/download/$ELM_VERSION/binary-for-linux-64-bit.gz \
&& gunzip elm.gz \
&& chmod +x elm \
&& mv ./elm /usr/local/bin \
# Smoke test
&& elm --version \
&& echo "Installed Elm Successfully"
USER $USERNAME
WORKDIR /home/$USERNAME
ENV HISTFILE /home/$USERNAME/bash_history/bash_history.txt
RUN yarn global add \
elm-test@$ELM_TEST_VERSION \
elm-format@$ELM_FORMAT_VERSION \
elm-verify-examples@$ELM_VERIFY_EXAMPLES_VERSION \
elm-doc-preview@$ELM_DOC_PREVIEW_VERSION \
elm-analyse@$ELM_ANALYSE_VERSION \
# Create the elm cache directory where we can mount a volume. If we don't create it like this
# it is auto created by docker on volume creation but with root as owner which makes it unusable.
&& mkdir .elm \
# Similar story here with the bash history we store in a volume
&& mkdir -p $(dirname $HISTFILE)
ENV PATH "$PATH:/home/$USERNAME/.yarn/bin"
RUN echo 'PATH="$PATH:/home/$USERNAME/.yarn/bin"' >> .bashrc