Commit ada879c 1 parent d782e13 commit ada879c Copy full SHA for ada879c
File tree 2 files changed +26
-5
lines changed
2 files changed +26
-5
lines changed Original file line number Diff line number Diff line change 11
11
pool :
12
12
vmImage : ubuntu-16.04
13
13
steps :
14
- - script : docker build -t baget .
14
+ - task : Docker@1
15
15
displayName : Build docker image
16
+ inputs :
17
+ command : build
18
+ dockerFile : Dockerfile
19
+ imageName : loicsharma/baget:$(Build.SourceVersion)
20
+
21
+ - task : Docker@1
22
+ displayName : Tag latest docker image
23
+ condition : eq(variables['build.sourcebranch'], 'refs/heads/master')
24
+ inputs :
25
+ command : tag
26
+ imageName : loicsharma/baget:$(Build.SourceVersion)
27
+ arguments : loicsharma/baget:latest
28
+
29
+ - task : Docker@1
30
+ displayName : Push docker image
31
+ condition : eq(variables['build.sourcebranch'], 'refs/heads/master')
32
+ inputs :
33
+ command : push
34
+ containerRegistryType : ' Container Registry'
35
+ dockerRegistryEndpoint : ' Docker Hub'
36
+ imageName : loicsharma/baget
16
37
17
38
- job : Artifacts
18
39
pool :
Original file line number Diff line number Diff line change @@ -33,10 +33,10 @@ You will need to add the symbol location `http://localhost:5000/api/download/sym
33
33
34
34
If you'd like, you can run BaGet on Docker:
35
35
36
- 1 . Build the docker image:
36
+ 1 . Pull the latest docker image:
37
37
38
38
```
39
- docker build . -t baget
39
+ docker pull loicsharma/ baget
40
40
```
41
41
42
42
2 . Create a file named ` baget.env ` with the content:
@@ -59,7 +59,7 @@ Search__Type=Database
59
59
4 . Run:
60
60
61
61
```
62
- docker run --rm --name nuget-server -p 5555:80 --env-file baget.env -v "$(pwd)/baget-data:/var/baget" baget:latest
62
+ docker run --rm --name nuget-server -p 5555:80 --env-file baget.env -v "$(pwd)/baget-data:/var/baget" loicsharma/ baget:latest
63
63
```
64
64
65
65
5 . Push your first package with:
@@ -68,4 +68,4 @@ docker run --rm --name nuget-server -p 5555:80 --env-file baget.env -v "$(pwd)/b
68
68
dotnet nuget push -s http://localhost:5555/v3/index.json -k NUGET-SERVER-API-KEY newtonsoft.json.11.0.2.nupkg
69
69
```
70
70
71
- 6 . Open the URL ` http://localhost:5555/ ` in your browser
71
+ 6 . Open the URL ` http://localhost:5555/ ` in your browser
You can’t perform that action at this time.
0 commit comments