Docker compose file and Bash Script -- 3

Job ID: 33199433

Budget: £10 – £20 GBP

Task 1:
Write a Bash script that computes the sum of the absolute values of integers given by standard input.
The numbers are given in a single line, separated by a space. You should print the sum of their absolute values to standard output.
For example, given the input:
2 41 -15
the script should print to the standard output:
58
as the absolute values of the numbers in the input are 2, 41 and 15, and their sum is 58.
Assume that:
The sum of absolute values of the input does not exceed 1018.
The machine is running Ubuntu 16.04.
In your solution, focus on correctness. The performance of your solution will not be the focus of the assessment.

Task 2:
docker compose file:
You and your team have to build a web application based on nginx in three supported versions:
mainline, which uses nginx version 1.17.9-perl;
stable, which uses a DEFAULT_NGINX_VERSION variable defined in the .en file;
alpine, which uses nginx version 1.17.9-alpine-perl.
Your role is to create a single docker-compose.yaml file with configuration for the three services, named exactly the same as the versions
listed above.
All of them should be built using nginx. Dockerfile with the following content, which is located in the same directory as the docker-compose.yaml file:
ARG NGINX_VERSION
ARG BUILD_FILE
FROM nginx:$(NGINX_VERSION)
COPY $(BUILD_FILE) /etc/nginx/conf.d
All images should be built as an app with the supported version as a tag, with the exception of the stable service, which should use a version value tag from DEFAULT_NGINX_VERSION.
The mainline and stable services should use debian.co as the BUILD_FILE argument, while the alpine file should be named alpine.conf.
Both are located in the same directory as docker-compose.yaml.
The build process is executed in the app directory:
test-solver@codility:/task/docker_compose_build$ ls -al app
total 12
drwxrwxr-x 3 test-solver test-solver 4096 Mar 7 13:58 .
drwxrwxr-x 6 test-solver test-solver 4096 Mar 7 13.57 ..
-rw-rw-r-- 1 test-solver test-solver 4006 Mar 7 13:58 alpine.conf
-rw-rw-r-- 1 test-solver test-solver 4006 Mar 7 13:58 debian. conf
-rw-rw-r-- 1 test-solver test-solver 4096 Mar 7 13:57 docker-compose.yaml
drwxrwxr- 7 test-solver test-solver 4096 Mar 7 13:57 .git
-rw-rw-r-- 1 test-solver test-solver 4096 Mar 7 13:57 nginx.Dockerfile
-rw-rw-r-- 1 test-solver test-solver 4096 Mar 7 13:57 .env
Related categories: Linux Bash Scripting Docker Compose