-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Classroom concept, issue #313 * Improved classroom concept documentation * Removed teaching instructions, linked to DockerHub * Update README.md * Update README.md Co-authored-by: Gary Rennie <[email protected]>
- Loading branch information
1 parent
a712bd5
commit 90f741b
Showing
2 changed files
with
41 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
FROM ruby:slim | ||
|
||
LABEL org.opencontainers.image.authors="[email protected]" | ||
|
||
RUN apt update && apt install -y git | ||
|
||
ENV DATA_PATH="/data" | ||
ENV REPO_PATH="/root/githug" | ||
ENV LEVEL_PATH="/git_hug" | ||
ENV GITHUG_PROFILE_INPUT="$LEVEL_PATH/.profile.yml" | ||
ENV GITHUG_HISTORY_OUTPUT="$DATA_PATH/history.txt" | ||
ENV GITHUG_PROFILE_OUTPUT="$DATA_PATH/profile.yml" | ||
|
||
RUN mkdir -p $DATA_PATH | ||
ADD . $REPO_PATH | ||
WORKDIR $REPO_PATH | ||
RUN gem build | ||
RUN gem install *.gem | ||
|
||
WORKDIR / | ||
RUN echo "y" | $GEM_HOME/bin/githug | ||
|
||
WORKDIR $LEVEL_PATH | ||
|
||
RUN printf "history -c\nHISTSIZE= \nHISTFILESIZE= \n\ | ||
echo '--- NEW SESSION ---' >> $GITHUG_HISTORY_OUTPUT\n\ | ||
export PATH=\"\$GEM_HOME/bin:\$PATH\"\ngithug reset\n" >> ~/.bashrc | ||
|
||
RUN printf "history -a\ncat \$HISTFILE >> $GITHUG_HISTORY_OUTPUT\n\ | ||
cp $GITHUG_PROFILE_INPUT $GITHUG_PROFILE_OUTPUT" >> ~/.bash_logout | ||
RUN printf ". ~/.bashrc\n" > ~/.bash_profile | ||
|
||
ENTRYPOINT ["/bin/bash", "--login"] | ||
VOLUME $LEVEL_PATH | ||
VOLUME $DATA_PATH |
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