Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DAC-TP
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pierre Michiels
DAC-TP
Commits
8be261c0
Commit
8be261c0
authored
4 years ago
by
Pierre Michiels
Browse files
Options
Downloads
Patches
Plain Diff
Update TP5 log.txt
parent
c3cc2fa9
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
TP5 log.txt
+4
-1
4 additions, 1 deletion
TP5 log.txt
with
4 additions
and
1 deletion
TP5 log.txt
+
4
−
1
View file @
8be261c0
TP5 (06.11.2020)
Docker avancé - Docker Image
Création d'un serveur Web simple:
- J'utilise le langage de programmation Python car c'est le langage le moins verbeux que je maitrise
(Python parmi Java, Javascript et C)
...
...
@@ -46,7 +48,7 @@ FROM golang:alpine AS builder
COPY main.go /app/
# se déplace dans le dossier /app
WORKDIR /app
#compile le fichier main.go
#compile le fichier main.go
-w et -s pour utiliser le moins de librairies possibles
RUN CGO_ENABLED=0 go build -ldflags="-w -s" main.go
#Depuis une image qui ne sert qu'a exécuter un script via sh
...
...
@@ -66,6 +68,7 @@ le rendre accessible depuis le port 8080 sur la mach. hôte et y insérer une va
Au final l'image contenant le fichier compilé "main" aura une taille de 4.55MB.
Déploiement de l'image:
...
...
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