From b9de63e3b93f0d329503a929c4b05d54b07a8c44 Mon Sep 17 00:00:00 2001 From: Maria Dmytrenko <79389256+marythedev@users.noreply.github.com> Date: Fri, 13 Oct 2023 22:24:09 -0400 Subject: [PATCH] Update README.md with instructions for Docker on EC2 --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 40b1789..bbe6868 100644 --- a/README.md +++ b/README.md @@ -118,3 +118,10 @@ Docker - for example, `docker run --rm --name fragments --env-file env.jest -e LOG_LEVEL=debug -p 8080:8080 -d fragments:latest` - run `docker logs -f ` (`-f` flag is for following the logs, can be run without it) +### Docker on EC2 +1. Install Docker `sudo yum install -y docker` (might need to reload the ssh session `exit`) +2. Start Docker `sudo dockerd` +3. Pack, transfer & unpack codebase (refer to commands in the sections above) +4. Run `npm install` (will generate package-lock.json) +5. Build image `sudo docker build -t fragments:latest .` +6. Run other commands needed to run docker container (add `sudo` for root rights)