From f5c40e4723d796c5a11cdb22d39464e2416b79d1 Mon Sep 17 00:00:00 2001 From: Alessandro Pignotti Date: Mon, 22 May 2023 17:07:40 +0200 Subject: [PATCH] README: Add Python REPL example --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 8c42df0..0603aa3 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,23 @@ From a local `git clone` - Start a local HTTP server - Enjoy your local WebVM. +# Example customization: Python3 REPL + +The `Deploy` workflow takes into account the `CMD` specified in the Dockerfile. To build a REPL you can simply apply this patch and deploy. + +```diff +diff --git a/dockerfiles/debian_mini b/dockerfiles/debian_mini +index 2878332..1f3103a 100644 +--- a/dockerfiles/debian_mini ++++ b/dockerfiles/debian_mini +@@ -15,4 +15,4 @@ WORKDIR /home/user/ + # We set env, as this gets extracted by Webvm. This is optional. + ENV HOME="/home/user" TERM="xterm" USER="user" SHELL="/bin/bash" EDITOR="vim" LANG="en_US.UTF-8" LC_ALL="C" + RUN echo 'root:password' | chpasswd +-CMD [ "/bin/bash" ] ++CMD [ "/usr/bin/python3" ] +``` + # Bugs and Issues Please use [Issues](https://github.com/leaningtech/webvm/issues) to report any bug.