-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker_commands.rtf
executable file
·62 lines (58 loc) · 2 KB
/
docker_commands.rtf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
{\rtf1\ansi\ansicpg1252\cocoartf1671\cocoasubrtf600
{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fmodern\fcharset0 Courier;\f2\fnil\fcharset0 Menlo-Regular;
}
{\colortbl;\red255\green255\blue255;\red0\green0\blue0;\red0\green0\blue0;\red0\green0\blue0;
\red255\green252\blue252;}
{\*\expandedcolortbl;;\cssrgb\c0\c0\c0;\csgray\c0\c0;\csgray\c0;
\csgenericrgb\c100000\c98739\c98760;}
\paperw11900\paperh16840\margl1440\margr1440\vieww21600\viewh12260\viewkind0
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
\f0\fs24 \cf0 Docker Commands\
\
\
Step 1: Create Image for Backend\
\
cd git/thesis_deployment/python_backend_api\
Python :
\f1\fs28 \cf2 \cb3 \CocoaLigature0 docker build . -t backend\
\f0\fs24 \cf0 \cb1 \CocoaLigature1 \
\
Step 2: Create image for front end\
cd git/thesis_deployment/react_frontend_ui \
UI :
\f1\fs28 \cf2 \cb3 \CocoaLigature0 docker build . -t frontend
\f0\fs24 \cf0 \cb1 \CocoaLigature1 \
\
\
Step 3: Create network\
Create Network:
\f1\fs28 docker network create
\f0\fs24
\f1\fs28 \cf2 \cb3 \CocoaLigature0 frontend_backend_connection
\f0\fs24 \cf0 \cb1 \CocoaLigature1 \
\
Step 4: \
Run Images\
\
cd git/thesis_deployment/python_backend_api\
Python :
\f1\fs28 \cf2 \cb3 \CocoaLigature0 docker run --rm --name backend --network frontend_backend_connection -p 8000:8000 backend\
\f0\fs24 \cf0 \cb1 \CocoaLigature1 \
\
cd git/thesis_deployment/react_frontend_ui\
UI :
\f1\fs28 \cf2 \cb3 \CocoaLigature0 docker run --rm --name frontend --network frontend_backend_connection -p 3000:3000 frontend\
\
Step 5: Forward ports of remote to local(not useful for running on local)\
SSH Login
\f0\fs24 \cf0 \cb1 \CocoaLigature1 \
ssh shashidh@dke110.cs.uni-magdeburg.de\
\
Connect app to localhost\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0
\f2 \cf4 \cb5 \CocoaLigature0 ssh -L 3000:localhost:3000 shashidh@dke110.cs.uni-magdeburg.de
\f1\fs28 \cf2 \cb3 \
\
\
\
}