-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from axonasif/axonasif/persist_files
Persist $HOME contents by overlaying /workspace, for Haskell toolchain
- Loading branch information
Showing
4 changed files
with
35 additions
and
21 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,22 +1,26 @@ | ||
FROM gitpod/workspace-full:latest | ||
# Image source code: https://github.com/axonasif/workspace-images/tree/tmp | ||
# Also see https://github.com/gitpod-io/workspace-images/issues/1071 | ||
FROM axonasif/workspace-base@sha256:8c057b1d13bdfe8c279c68aef8242d32110c8d5310f9a393f9c0417bc61367d9 | ||
|
||
USER gitpod | ||
|
||
# Persist ~ due to the requirements of this project | ||
RUN echo 'create-overlay $HOME' > "$HOME/.runonce/1-home_persist" | ||
|
||
# or git will keep prompting | ||
RUN git config --global pull.ff only | ||
|
||
# ~/.stack, ~/.ghcup will be lost across Gitpod workspace restarts, | ||
# use /workspace/ so it is persisted as part of prebuilt workspace | ||
ENV STACK_ROOT=/workspace/.stack | ||
ENV GHCUP_INSTALL_BASE_PREFIX=/workspace | ||
|
||
# Add ghcup to path | ||
ENV PATH=/workspace/bin:/workspace/.ghcup/bin:${PATH} | ||
|
||
# create toolhome | ||
RUN mkdir -p /workspace/bin | ||
# add /workspace/bin and ghcup to PATH | ||
ENV PATH="/workspace/bin:$HOME/.ghcup/bin:$PATH" | ||
|
||
# install ghcup, then stack and hls via it | ||
RUN curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | env BOOTSTRAP_HASKELL_NONINTERACTIVE=1 sh | ||
RUN ghcup install stack | ||
RUN ghcup install hls | ||
RUN ghcup install stack && \ | ||
ghcup install hls | ||
# populate stack's cache, this takes minutes & GBs | ||
RUN stack update | ||
|
||
# install latest epm | ||
RUN mkdir -p $HOME/.local/bin; \ | ||
curl -o $HOME/.local/bin/epm -L https://github.com/e-wrks/epm/raw/latest/epm && \ | ||
chmod +x $HOME/.local/bin/epm |
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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
// All paths are relative to your main repo | ||
// The additional repos are cloned inside /workspace dir | ||
"folders": [ | ||
{ | ||
"path": "." // Main repo that you will open in Gitpod (e.g. frontend) | ||
}, | ||
{ | ||
"path": "/workspace/edh-universe" // Additional repo | ||
} | ||
] | ||
} |