From b10d10b2fd02b476489f3175e16ce9d7144ea295 Mon Sep 17 00:00:00 2001 From: stottidfe Date: Mon, 23 Oct 2023 12:20:35 +0100 Subject: [PATCH 1/6] check in instrauctions for docker/win --- .../dev-tools/index.html.md.erb | 3 + .../infrastructure/docker/index.html.md.erb | 154 ++++++++++++++++++ 2 files changed, 157 insertions(+) create mode 100644 source/infrastructure/docker/index.html.md.erb diff --git a/source/infrastructure/dev-tools/index.html.md.erb b/source/infrastructure/dev-tools/index.html.md.erb index a88b86dd..f014a724 100644 --- a/source/infrastructure/dev-tools/index.html.md.erb +++ b/source/infrastructure/dev-tools/index.html.md.erb @@ -9,6 +9,9 @@ weight: 10 Installation of each product should be carried out following the distributors current guidance, depending on your operating system. +## Desktop Docker +The Desktop docker application interface is a cross-platform GUI tool to help developers build images to create containers for application development and deployment to cloud containers in azure. Desktop docker allows the user full administrative rights over all aspects of the development of applications run in a container. For tech guidance [instructions](/infrastructure/docker). + ## Azure CLI The Azure Command-Line Interface (CLI) is a cross-platform command-line tool to connect to Azure and execute administrative commands on Azure resources. It allows the execution of commands through a terminal using interactive command-line prompts or a script. diff --git a/source/infrastructure/docker/index.html.md.erb b/source/infrastructure/docker/index.html.md.erb new file mode 100644 index 00000000..a626de1a --- /dev/null +++ b/source/infrastructure/docker/index.html.md.erb @@ -0,0 +1,154 @@ +--- +title: Desktop Docker +--- + +# <%= current_page.data.title %> + +<%= partial('partials/page_toc') %> + +the Folowwing information has been put together using; + + * Edition Windows 11 Enterprise Version 22H2 Installed on ‎13/‎03/‎2023 OS build 22621.2283 Experience Windows Feature Experience Pack 1000.22662.1000.0 + + * all instruction are for use with DFE laptops with developer settings + + * all images are built using standard docker tooling + + * development IDE is visual studio code + + * visual studio code has docker extension installed + + * development code is running nodejs + + * development code is using npm as its package manager + +## Installing Docker +You will need access to docker-users group on the system user groups of your machine in order to run docker and possibly an update to the wsl kernal (achieve this by requesting a meeting with system administrator who will be able to screen share and run the update for you) + +Requests should be made through the service portal, Access to restricted Groups and DFE sign-in requests along with your request for desktop-docker all will need to be raised by your DM or TL. Once complete it will appear in your software centre for you to install. For more information go here [install docker on windows](https://docs.docker.com/desktop/install/windows-install/) + +## Operating Desktop-Docker +Once installed start the application by clicking on the desktop icon added during installation. + + +## Build An Image + +To get started, follow the steps below: + +* Navigate to the Visual Studio code + +* Click on `Terminal`, this is found in the main menu at the top of the visual studio code IDE + +* Ensure you are in the cursor is in the terminal window at the end of the current directory + +* Use command line to navigate to your local source repo 'CD' + +* Create a new folder 'mkdir' new it the project name + +* Navigate to the newly created folder + +* Now in the ternimal window and the root of the folder type 'code .' this will open a new VSC IDE in the current project folder + +* Make sure you have desktop docker running + +* type in the terminal window 'npm init -y' this will build a simple project structure + +* once complete type in the terminal 'npm install express' + +* Create a file called index.js and add it to the root directory + +* Open index.js in the editor and add this line to the top of the file + +```` + +const express = require('express'); + +```` + +* Now below that add + +```` + +const app = express(); + +```` + +* and on the next line add + +```` + +app.use(express.json()); + +```` +* Add to the next line + +```` + +const PORT = process.env.PORT || 3000; + +```` +* Now and add + +``` +app.listen(PORT, () => { + console.log("Server Listening on PORT:", PORT); +}); +``` +* Now you need to define a route in your project for this we will add a status to return running add the following to the index.js + +```` +app.get("/status", (request, response) => { + const status = { + "Status": "Running" + }; + + response.send(status); +}); +```` +* Open package.json file and add to the script section of the file + +```` + "start": "node index.js" + + ```` + making sure to add a comma to the end of the line above + +* now in the terminal window type 'npm start' + +* you should see a project start command a node command and server listening on the port number 3000 + +* to close the server with the cursor in the terminal window select 'CTRL + C' and select 'Y' + +* Once successfully set up you are ready to add docker + +* Select 'View' from the top menu of yyou visual studio code IDE + +* Click command Pallet + +* In the command pallet at the > type Docker a list will appear select 'Add Docker Compose Files To Workspace' + +* next select application platform 'NODEJS' + +* Next select the script that hold your start command 'package.json' file + +* Next select the port default is 3000 + +* VSC will then prompt you to add a docker file select yes + +* VSC has now added all the files necessary to run your project in docker by issuing commands to your compose file + +* To test this select one of the compose files right click and select 'Compose Up' + +* VSC will now build your image and your container and start it running which can be seen in the terminal window + +* Once started you can go back to your browser and enter 'http://localhost:3000/status' the browser should return +```` +{ + "Status": "Running" +} +```` +* For more information on docker and compose goto: [How to use docker and compose](https://code.visualstudio.com/docs/containers/docker-compose) + +* For more information on docker extension in Vsc goto: [Overview of contaoners in VSC](https://code.visualstudio.com/docs/containers/overview) + +* For more information on docker and node starter kit in vsc goto: [Quick node starter page](https://code.visualstudio.com/docs/containers/quickstart-node) \ No newline at end of file From 3c8e0bacab7dd86e5de81baa8c8d4bea4cf1db59 Mon Sep 17 00:00:00 2001 From: stottidfe Date: Fri, 1 Dec 2023 10:25:48 +0000 Subject: [PATCH 2/6] fixed to comments --- source/infrastructure/dev-tools/index.html.md.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/infrastructure/dev-tools/index.html.md.erb b/source/infrastructure/dev-tools/index.html.md.erb index f014a724..6032cacf 100644 --- a/source/infrastructure/dev-tools/index.html.md.erb +++ b/source/infrastructure/dev-tools/index.html.md.erb @@ -9,8 +9,8 @@ weight: 10 Installation of each product should be carried out following the distributors current guidance, depending on your operating system. -## Desktop Docker -The Desktop docker application interface is a cross-platform GUI tool to help developers build images to create containers for application development and deployment to cloud containers in azure. Desktop docker allows the user full administrative rights over all aspects of the development of applications run in a container. For tech guidance [instructions](/infrastructure/docker). +## Docker Desktop +The Docker Desktop application interface is a cross-platform GUI tool to help developers build images to create containers for application development and deployment to cloud containers in azure. Desktop docker allows the user full administrative rights over all aspects of the development of applications run in a container. For tech guidance [instructions](/infrastructure/docker). ## Azure CLI The Azure Command-Line Interface (CLI) is a cross-platform command-line tool to connect to Azure and execute administrative commands on Azure resources. It allows the execution of commands through a terminal using interactive command-line prompts or a script. From a4c79647957c7dc40ad593f41359ff72cd82a8fe Mon Sep 17 00:00:00 2001 From: stottidfe Date: Fri, 1 Dec 2023 11:41:04 +0000 Subject: [PATCH 3/6] resolve comments --- .../dev-tools/index.html.md.erb | 2 +- .../infrastructure/docker/index.html.md.erb | 40 ++++++++++++++++--- 2 files changed, 36 insertions(+), 6 deletions(-) diff --git a/source/infrastructure/dev-tools/index.html.md.erb b/source/infrastructure/dev-tools/index.html.md.erb index 6032cacf..264ceed2 100644 --- a/source/infrastructure/dev-tools/index.html.md.erb +++ b/source/infrastructure/dev-tools/index.html.md.erb @@ -10,7 +10,7 @@ weight: 10 Installation of each product should be carried out following the distributors current guidance, depending on your operating system. ## Docker Desktop -The Docker Desktop application interface is a cross-platform GUI tool to help developers build images to create containers for application development and deployment to cloud containers in azure. Desktop docker allows the user full administrative rights over all aspects of the development of applications run in a container. For tech guidance [instructions](/infrastructure/docker). +A cross-platform GUI tool to help developers build images to create containers for application development and deployment to cloud containers in azure. Desktop docker allows the user full administrative rights over all aspects of the development of applications which run transparently in a virtual machine containers. Docker Desktop is Written using the go language to take advantage of the linux kernal to deliver its functionality, utilising a technology called namespaces to achieve containerisation For tech guidance [instructions](/infrastructure/docker). ## Azure CLI The Azure Command-Line Interface (CLI) is a cross-platform command-line tool to connect to Azure and execute administrative commands on Azure resources. It allows the execution of commands through a terminal using interactive command-line prompts or a script. diff --git a/source/infrastructure/docker/index.html.md.erb b/source/infrastructure/docker/index.html.md.erb index a626de1a..cc28a77f 100644 --- a/source/infrastructure/docker/index.html.md.erb +++ b/source/infrastructure/docker/index.html.md.erb @@ -1,5 +1,5 @@ --- -title: Desktop Docker +title: Docker Desktop --- # <%= current_page.data.title %> @@ -25,7 +25,37 @@ the Folowwing information has been put together using; ## Installing Docker You will need access to docker-users group on the system user groups of your machine in order to run docker and possibly an update to the wsl kernal (achieve this by requesting a meeting with system administrator who will be able to screen share and run the update for you) -Requests should be made through the service portal, Access to restricted Groups and DFE sign-in requests along with your request for desktop-docker all will need to be raised by your DM or TL. Once complete it will appear in your software centre for you to install. For more information go here [install docker on windows](https://docs.docker.com/desktop/install/windows-install/) +[Requests should be made through the service portal](https://dfe.service-now.com/serviceportal) + +Use [User Access to restricted Groups](https://dfe.service-now.com/serviceportal?id=sc_cat_item&sys_id=59d68b331bd13050199d6397b04bcb23) + +* RequestedFor should be pre filled with your name + +* RequestedTo should be pre filled with your name, 'If you are doing this for another member of staff you can now change to there name + +* In do you want to add or remove access drop down select 'Add Access' + +* In Which Group(s) would you like to add the user to type 'docker-users' + +* In Is there any other information you would like to provide? type 'required to run Docker Desktop to complete daily software engineering tasks' + +and for the driver installation you should + +Use [Install device driver on my device](https://dfe.service-now.com/serviceportal?id=sc_cat_item&sys_id=c8748b941ba670904f999978b04bcb18&sysparm_category=09e18be6db2f8340865049ee3b96190f) + +* RequestedFor should be pre filled with your name, 'If you are doing this for another member of staff you can now change to there name + +* Contect Number Usually phone number that you can be reached on + +* In Options for device drop down select 'Other' + +* In Laptop/Tablet Asset Number add you laptop number "this can be found in windows by going to 'control panel > system > device name'" + +* In Please confirm the type of Device, including Make and Model enter the make and model information from systems about + +* In Please explain the reason why you need the driver installing type "required to run Docker Desktop to complete daily software engineering tasks" + +All will need to be raised by your Delivery Manager or Team Lead. Once complete it will appear in your software centre for you to install. For more information go here [install docker on windows](https://docs.docker.com/desktop/install/windows-install/) ## Operating Desktop-Docker Once installed start the application by clicking on the desktop icon added during installation. @@ -39,7 +69,9 @@ To get started, follow the steps below: * Click on `Terminal`, this is found in the main menu at the top of the visual studio code IDE -* Ensure you are in the cursor is in the terminal window at the end of the current directory +* Make sure you have desktop docker running + +* Ensure your cursor is in the terminal window at the end of the current directory * Use command line to navigate to your local source repo 'CD' @@ -49,8 +81,6 @@ To get started, follow the steps below: * Now in the ternimal window and the root of the folder type 'code .' this will open a new VSC IDE in the current project folder -* Make sure you have desktop docker running - * type in the terminal window 'npm init -y' this will build a simple project structure * once complete type in the terminal 'npm install express' From a9931e2531f99213e1dd9559c84018ca14f64e01 Mon Sep 17 00:00:00 2001 From: stottidfe Date: Fri, 1 Dec 2023 11:42:29 +0000 Subject: [PATCH 4/6] re-word --- source/infrastructure/docker/index.html.md.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/infrastructure/docker/index.html.md.erb b/source/infrastructure/docker/index.html.md.erb index cc28a77f..ed8736f8 100644 --- a/source/infrastructure/docker/index.html.md.erb +++ b/source/infrastructure/docker/index.html.md.erb @@ -69,7 +69,7 @@ To get started, follow the steps below: * Click on `Terminal`, this is found in the main menu at the top of the visual studio code IDE -* Make sure you have desktop docker running +* Make sure you have docker desktop running * Ensure your cursor is in the terminal window at the end of the current directory From af3134a91914713828b2dacdeb0228bc417fae5d Mon Sep 17 00:00:00 2001 From: stottidfe Date: Fri, 1 Dec 2023 11:44:01 +0000 Subject: [PATCH 5/6] re-word --- source/infrastructure/docker/index.html.md.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/infrastructure/docker/index.html.md.erb b/source/infrastructure/docker/index.html.md.erb index ed8736f8..601a9803 100644 --- a/source/infrastructure/docker/index.html.md.erb +++ b/source/infrastructure/docker/index.html.md.erb @@ -69,7 +69,7 @@ To get started, follow the steps below: * Click on `Terminal`, this is found in the main menu at the top of the visual studio code IDE -* Make sure you have docker desktop running +* Make sure you have Docker Desktop running * Ensure your cursor is in the terminal window at the end of the current directory From 8f6436c52f05709ddd616adc46d8864db6e0e762 Mon Sep 17 00:00:00 2001 From: stottidfe Date: Fri, 1 Dec 2023 11:47:22 +0000 Subject: [PATCH 6/6] finish instructions --- source/infrastructure/docker/index.html.md.erb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/source/infrastructure/docker/index.html.md.erb b/source/infrastructure/docker/index.html.md.erb index 601a9803..8df21ad2 100644 --- a/source/infrastructure/docker/index.html.md.erb +++ b/source/infrastructure/docker/index.html.md.erb @@ -39,6 +39,8 @@ Use [User Access to restricted Groups](https://dfe.service-now.com/serviceportal * In Is there any other information you would like to provide? type 'required to run Docker Desktop to complete daily software engineering tasks' +* Now submit your request + and for the driver installation you should Use [Install device driver on my device](https://dfe.service-now.com/serviceportal?id=sc_cat_item&sys_id=c8748b941ba670904f999978b04bcb18&sysparm_category=09e18be6db2f8340865049ee3b96190f) @@ -49,11 +51,13 @@ Use [Install device driver on my device](https://dfe.service-now.com/serviceport * In Options for device drop down select 'Other' -* In Laptop/Tablet Asset Number add you laptop number "this can be found in windows by going to 'control panel > system > device name'" +* In Laptop/Tablet Asset Number add you laptop number "this can be found in windows by going to 'control panel > system > device name'" + +* In Please confirm the type of Device, including Make and Model enter the make and model information from systems about -* In Please confirm the type of Device, including Make and Model enter the make and model information from systems about +* In Please explain the reason why you need the driver installing type "required to run Docker Desktop to complete daily software engineering tasks" -* In Please explain the reason why you need the driver installing type "required to run Docker Desktop to complete daily software engineering tasks" +* Now submit your request All will need to be raised by your Delivery Manager or Team Lead. Once complete it will appear in your software centre for you to install. For more information go here [install docker on windows](https://docs.docker.com/desktop/install/windows-install/)