diff --git a/Dockerfile b/Dockerfile index 1e00740e..54fa6864 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ FROM tomcat:8.5.40 -COPY target/sampleapp.war /usr/local/tomcat/webapps +#COPY target/sampleapp.war /usr/local/tomcat/webapps EXPOSE 8080 CMD /usr/local/tomcat/bin/catalina.sh run # diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 00000000..dde6459e --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,26 @@ +trigger: +- main + +pool: + name: default + demands: + - agent.name -equals devtest + +steps: + - task: Bash@3 + inputs: + targetType: 'inline' + script: | + # Write your commands here + whoami + sudo docker build --file Dockerfile --tag sample:1 . + sudo docker images + + + - task: DockerCompose@0 + inputs: + containerregistrytype: 'Azure Container Registry' + azureSubscription: 'Free Trial(fc11941c-8de6-445e-b2cc-3ac7ac3961e3)' + azureContainerRegistry: '{"loginServer":"devsample.azurecr.io", "id" : "/subscriptions/fc11941c-8de6-445e-b2cc-3ac7ac3961e3/resourceGroups/dev/providers/Microsoft.ContainerRegistry/registries/devsample"}' + dockerComposeFile: '**/docker-compose.yml' + action: 'Build services' \ No newline at end of file diff --git a/naresh.txt b/naresh.txt deleted file mode 100644 index 7013017a..00000000 --- a/naresh.txt +++ /dev/null @@ -1,2 +0,0 @@ - -asdfsdf