-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New docker image: haskell 8.8.3, STACK_ROOT and lts-15.4
- Loading branch information
Showing
1 changed file
with
17 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,30 @@ | ||
FROM haskell:8.6.5 | ||
FROM haskell:8.8.3 | ||
|
||
COPY --from=dastapov/hledger:1.17 /usr/bin/hledger* /usr/bin/ | ||
ENV RESOLVER lts-15.4 | ||
|
||
COPY --from=dastapov/hledger:1.17.1.1 /usr/bin/hledger* /usr/bin/ | ||
|
||
COPY ./01-getting-started/export/export.hs /tmp | ||
|
||
# Precompile all packages needed for export.hs | ||
RUN /tmp/export.hs -v && rm -r /tmp/export.hs /root/.stack/indices/Hackage/00-index.tar /root/.stack/indices/Hackage/00-index.tar.gz && chmod -R g+rX,o+rX /root /root/.stack/ | ||
RUN stack --resolver $RESOLVER --system-ghc script --package shake --package directory /tmp/export.hs -- -v \ | ||
&& rm -r /tmp/export.hs \ | ||
&& chmod -R g+wrX,o+wrX /root \ | ||
&& apt-get update \ | ||
&& apt-get install --yes patchutils gawk sudo \ | ||
&& rm -rf /var/lib/apt/lists | ||
|
||
RUN apt-get update && apt-get install --yes patchutils gawk && rm -rf /var/lib/apt/lists | ||
RUN adduser --system --ingroup root hledger | ||
|
||
# This is where the data dir would be mounted to | ||
RUN mkdir full-fledged-hledger | ||
WORKDIR full-fledged-hledger | ||
VOLUME full-fledged-hledger | ||
|
||
RUN mkdir /home/user && chmod 0777 /home/user | ||
ENV HOME /home/user | ||
RUN echo "cp -a /root/.stack /home/user" > /home/user/.bashrc | ||
ENV STACK_ROOT /root/.stack | ||
RUN echo "allow-different-user: true" >> /root/.stack/config.yaml | ||
|
||
USER hledger | ||
WORKDIR full-fledged-hledger | ||
ENV LC_ALL C.UTF-8 | ||
|
||
CMD ["bash"] |