From ac6c42fd4c925ca479951770a802a2f1933d1435 Mon Sep 17 00:00:00 2001 From: ni-richard Date: Mon, 9 Sep 2019 08:53:37 +0200 Subject: [PATCH] Created Building everything manually (markdown) --- Building-everything-manually.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Building-everything-manually.md diff --git a/Building-everything-manually.md b/Building-everything-manually.md new file mode 100644 index 0000000..571b939 --- /dev/null +++ b/Building-everything-manually.md @@ -0,0 +1,29 @@ +In case you would like to avoid running anything locally and/or pulling images from [Docker hub](https://hub.docker.com/LINK_TO_THE_IMAGE), let's see how we can build the images completely manually. If you are here by accident, you should just use our [tfw.sh](https://github.com/LINK_TO_TFW_SH) script instead. + +### Connection among the images +First of all, let's take a look at the `FROM` statements in each `Dockerfile`: +``` +Frontend: +FROM avatao/debian:buster + +Base image: +FROM REPLACE_ME:tag as frontend +FROM avatao/debian:buster + +Test challenge: +FROM BASEIMAGE_ON_DOCKER_HUB +``` + +As you can see, we use multistage building in the base image, so we should move forward in this exact order. + +### Building the images +Make sure you have every [dependency](https://github.com/avatao-content/baseimage-tutorial-framework/wiki/Setting-up-a-development-environment) installed, then clone the [baseimage](https://github.com/avatao-content/baseimage-tutorial-framework), [frontend](https://github.com/avatao-content/frontend-tutorial-framework) and [test](https://github.com/avatao-content/test-tutorial-framework) repos next to each other. Finally, enter these commands to build all of them: +``` +cd frontend-tutorial-framework +docker build -t frontend-tutorial-framework:tag . +cd ../baseimage-tutorial-framework +docker build -t tutorial-framework:tag . +cd ../test-tutorial-framework +docker build -t test-tutorial-framework -f solvable/Dockerfile . +docker run --rm -p 8888:8888 -e AVATAO_SECRET=secret test-tutorial-framework +``` \ No newline at end of file