Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
report
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ISC2
virtu
report
Commits
2b825811
Verified
Commit
2b825811
authored
11 months ago
by
iliya.saroukha
Browse files
Options
Downloads
Patches
Plain Diff
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
11 months ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
content/08_dockerfiles.md
+56
-0
56 additions, 0 deletions
content/08_dockerfiles.md
with
56 additions
and
0 deletions
content/08_dockerfiles.md
+
56
−
0
View file @
2b825811
...
@@ -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
```
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment