The main goal of the subproject DOCKERIZE is to create a Dockerfile (== an executable that contains the files and the dependencies of a program.), one image and one container
You have to create a Dockerfile which contains the following :
FROM golang:1.16.3
RUN mkdir /ascii-art-web-dockerize
COPY . /ascii-art-web-dockerize
WORKDIR /ascii-art-web-dockerize
RUN go build -o main .
CMD [ "/ascii-art-web-dockerize/main" ]
Afterwards, in order to run the docker in the command prompt:
You have to build the program with the command :
```cmd
docker build -t ascii-art-web-dockerize .
Then, run it with the command :
docker run -it --rm -p 8000:8001 ascii-art-web-dockerize
This project helped us learn about the topics below :
- Client utilities.
- The basics of web :
- Server
- HTTP
- HTML
- Learning about docker.
- Using and setting up Docker :
- Services and dependencies.
- Containerizing an application.
- Compatibility/Dependency.
- Creating images.
- Ways to receive data.
- Ways to output data.