![]() New-IISSite -Name "MyApp" -PhysicalPath C:\myapp -BindingInformation "*:8000:" Install-WindowsFeature NET-Framework-45-ASPNET \ iis-server/Dockerfile: FROM microsoft/iis iis-server # The location (can be a URL) of our imageĭockerfile: Dockerfile # The name of the file to reference (could be any name) You can see this in the following code snippet: services: # A "section" that specifies servicesīuild: # We specify that we want to build an imageĬontext. We then specify that when we run docker-compose, we want it to build a brand-new image/container using the Dockerfile in the specified location (context). We give it the simple name web, but it can be anything as long as it is a string with no spacing. First, we define our actual web application (site). The second section, services, is where the fun stuff is! We are going to specify two separate containers (or services) in this section. We could use additional versions if needed, but version 3 is the recommended one. We have specified at the top of our docker-compose.yml file that we would like to use version 3 of the Docker Compose file reference. Now let's break down our folder structure. ![]() The second container will be a nanoserver that just runs and tests that our IIS Server is up and running (as expected). One will be our actual IIS Server with a sample Home.html page. With this simple file, we will create two containers. For this example, we are only going to be focusing on version, services, and (later on) networks. Additionally, Docker has specified that a docker-compose.yml file can only have a few top-level keys, which define "sections" within our configuration file. Our docker-compose.yml file looks like this: version: "3"Ĭommand: powershell -executionpolicy bypass "c:\temp\iis-server-test.ps1"Ī Docker Compose file uses a YAML configuration syntax to build and manage our containers. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |