-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathfor_evaluator.sh
24 lines (15 loc) · 923 Bytes
/
for_evaluator.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
### 0. Fulfill prerequisites
# - Double check whether Docker Desktop is running.
# - Start evaluation from the ft_server directory.
name_of_image="coffee"
name_of_container="sleep"
### 1. Build an image from a 'Dockerfile' using the current directory as context
# -t, --tag list Name and optionally a tag in the 'name:tag' format
docker build -t ${name_of_image} .
### 2. Run a command in a new container
# --name string Assign a name to the container
# --rm Automatically remove the container when it exits
# -i, --interactive Keep STDIN open even if not attached
# -t, --tty Allocate a pseudo-TTY
# -p, --publish list Publish a container's port(s) to the host
docker run --name ${name_of_container} --rm -it -p 80:80/tcp -p 80:80/udp -p 443:443/tcp -p 443:443/udp ${name_of_image}