Skip to content

Commit

Permalink
Merge pull request #28 from opensafely-core/Jongmassey/motd
Browse files Browse the repository at this point in the history
Echo MOTD in every shell
  • Loading branch information
Jongmassey authored May 28, 2024
2 parents 2174025 + 1f899b4 commit 557d2df
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ RUN --mount=type=cache,target=/var/cache/apt \
echo 'exec /opt/venv/bin/python3.10 "$@"' > /usr/bin/python &&\
# Activate the venv in every terminal
echo "source /opt/venv/bin/activate" >> /home/rstudio/.bashrc &&\
# Print the MOTD/help text in every shell
echo "cat /etc/motd" >> /home/rstudio/.bashrc &&\
# Configure RStudio Server to run without auth
echo "auth-none=1" >> /etc/rstudio/rserver.conf &&\
echo "USER=rstudio" >> /etc/environment &&\
Expand All @@ -47,6 +49,9 @@ COPY --chown=rstudio:rstudio --from=ghcr.io/opensafely-core/python:v2 /opt/venv
# hadolint ignore=DL3022
COPY --chown=rstudio:rstudio --from=ghcr.io/opensafely-core/r:latest /renv/lib/R-4.0/x86_64-pc-linux-gnu/ /usr/local/lib/R/site-library

# copy in the MOTD file containing the required help text
COPY motd /etc/motd

# Required for installing opensafely cli
ENV PATH="/home/rstudio/.local/bin:${PATH}"

Expand Down
10 changes: 10 additions & 0 deletions motd
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
This is an OpenSAFELY Codespace

All 'opensafely' commands (e.g 'opensafely run', 'opensafely exec') are availble
in this terminal.

The latest version of ehrQL has been installed, and the Python and R libraries installed
here are the same as those available in the corresponding OpenSAFELY actions.

Additional help is available in the #opensafely-users Slack channel and at
https://docs.opensafely.org/getting-started/how-to/use-github-codespaces-in-your-project/

0 comments on commit 557d2df

Please sign in to comment.