Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CTP Virtu
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
Mehdi Zaidi
CTP Virtu
Commits
6f091dc8
Commit
6f091dc8
authored
2 years ago
by
Mehdi Zaidi
Browse files
Options
Downloads
Patches
Plain Diff
add readme
parent
f66fee1d
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Dockerfile
+1
-10
1 addition, 10 deletions
Dockerfile
readme.md
+11
-0
11 additions, 0 deletions
readme.md
with
12 additions
and
10 deletions
Dockerfile
+
1
−
10
View file @
6f091dc8
# Mehdi ZAIDI FRENE25 grp G
# CTP 15/02/2023
## USAGE :
## Build the image with 'sudo docker build -t webcalc .'
## Start a container with 'sudo docker run --rm -d --name webcalc -p 8000:8000 webcalc'
## Send an http request to 'localhost:8000' to do maths
## exemple : curl -X POST localhost:8000 -H 'Content-Type: application/json' -d '{"operation": "PLUS", "op1": 3, "op2": 4}'
## When you're done, 'sudo docker container kill webcalc' to stop it.
## To execute tests : 'sudo docker run --rm -it webcalc tests.py'
# Mehdi ZAIDI FRENE25 groupe G
FROM
debian:bullseye
RUN
apt-get update
&&
apt-get
install
-y
python3 wget unzip
&&
rm
-r
/var/lib/apt/lists/
*
...
...
This diff is collapsed.
Click to expand it.
readme.md
0 → 100644
+
11
−
0
View file @
6f091dc8
# Mehdi ZAIDI FRENE25 groupe G
## Usage
1.
Build the image with
`sudo docker build -t webcalc .`
2.
Start a container with
`sudo docker run --rm -d --name webcalc -p 8000:8000 webcalc`
3.
Send an http request to
`localhost:8000`
to do maths
> exemple : `curl -X POST localhost:8000 -H 'Content-Type: application/json' -d '{"operation": "PLUS", "op1": 3, "op2": 4}'`
4.
When you're done,
`sudo docker container kill webcalc`
to stop it.
To execute tests :
`sudo docker run --rm -it webcalc tests.py`
\ No newline at end of file
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