Skip to content
Snippets Groups Projects
Verified Commit 2b825811 authored by iliya.saroukha's avatar iliya.saroukha :first_quarter_moon:
Browse files

feat: part 1 of ex4 done (lab8)

parent 92cc2586
No related branches found
No related tags found
No related merge requests found
Pipeline #32471 passed
...@@ -277,3 +277,59 @@ ENTRYPOINT ["/usr/bin/alienwave"] ...@@ -277,3 +277,59 @@ ENTRYPOINT ["/usr/bin/alienwave"]
REPOSITORY TAG IMAGE ID CREATED SIZE REPOSITORY TAG IMAGE ID CREATED SIZE
alienwave_multistage 1.0 1c7f0a242c2c 4 minutes ago 12MB alienwave_multistage 1.0 1c7f0a242c2c 4 minutes ago 12MB
``` ```
## Exercice 4
### Partie 1
#### Dockerfile
```bash
FROM ubuntu:22.04 as BUILDER
RUN apt update -y && apt install -y golang ca-certificates
RUN go install github.com/alfg/asciicat@latest
FROM alpine:3.20
RUN apk update
COPY --from=builder /root/go/bin/asciicat /usr/bin
COPY . .
ENTRYPOINT ["usr/bin/asciicat"]
```
#### Fabrication de l'image
```bash
docker buildx build . -t asciicat:1.0 -f Dockerfile1
```
#### Utilisation
```bash
docker run --rm asciicat:1.0 -i gopher.png
```
- Quelle est la taille de l'image générée ?
```bash
docker run --rm asciicat:1.0 --help
```
```bash
Usage of usr/bin/asciicat:
-i string
Use -i <filename> (default "gopher.png")
-w int
Use -w <width> (default 80)
```
Donc la largeur par défaut de l'image est 80
- Quelle est la ligne de commande à exécuter pour obtenir une largeur de 40
```bash
docker run --rm asciicat:1.0 -i gopher.png -w 40
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment