Skip to content

Commit 7922aa8

Browse files
authored
Remove old docker files and add doc for using docker (#749)
* Remove old docker files and add doc for using docker with dotnet-buildtools-prereqs * Updates based on PR feedback * Fixing up headers * Added commit used for docker files * Fix problem with table * Add source-build commit in verified column. * Fix column alignment
1 parent 4f3eacd commit 7922aa8

File tree

6 files changed

+63
-119
lines changed

6 files changed

+63
-119
lines changed

docker/README.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Docker Images #
2+
3+
The following docker images have been verified to successfully build the source-build repo by:
4+
5+
1. Building source-build
6+
2. Building the resulting tarball
7+
3. Running smoke tests
8+
9+
| OS | Image Name | Image Source | Verified Source-build Commit / Date |
10+
| :--- | :--- | :--- | :---: |
11+
| CentOS 7.1 | microsoft/dotnet-buildtools-prereqs:centos-7-b46d863-20180719033416 | [Dockerfile](https://github.com/dotnet/dotnet-buildtools-prereqs-docker/blob/b46d86339939ada16dfb8be30ebe62fbd51d3999/src/centos/7/Dockerfile) | [4f3eacd](https://github.com/dotnet/source-build/commit/4f3eacdd0551677444ab917d4e332653672e0bd5) / 2018.09.05 |
12+
| Fedora 28 | microsoft/dotnet-buildtools-prereqs:fedora-28-c103199-20180628122443 | [Dockerfile](https://github.com/dotnet/dotnet-buildtools-prereqs-docker/blob/c103199065cb74842c2983f0422ea4a1f0b0fe25/src/fedora/28/Dockerfile) | [4f3eacd](https://github.com/dotnet/source-build/commit/4f3eacdd0551677444ab917d4e332653672e0bd5) / 2018.09.05 |
13+
| Ubuntu 16.04 | microsoft/dotnet-buildtools-prereqs:ubuntu-16.04-c103199-20180628134544 |[Dockerfile](https://github.com/dotnet/dotnet-buildtools-prereqs-docker/blob/c103199065cb74842c2983f0422ea4a1f0b0fe25/src/ubuntu/16.04/Dockerfile) | [4f3eacd](https://github.com/dotnet/source-build/commit/4f3eacdd0551677444ab917d4e332653672e0bd5) / 2018.09.05 |
14+
15+
## Building source-build with Docker ##
16+
17+
### Running an interactive docker container ###
18+
```
19+
### Run a bash shell inside a docker container. All later steps run in the interactive shell.
20+
docker run -it --rm <imageName> /bin/bash
21+
22+
### Clone source-build repo
23+
git clone https://github.com/dotnet/source-build
24+
cd source-build
25+
26+
### Build source-build to create a tarball
27+
./build-source-tarball.sh ../tarball
28+
29+
### Build the tarball
30+
cd ../tarball
31+
./build.sh
32+
33+
### Run smoke tests
34+
./smoke-test.sh
35+
36+
### Clean up the container when you're done working with the build results
37+
exit
38+
```
39+
40+
### Running with a docker volume ###
41+
Running build commands in a docker container with a docker volume for a working directory. A docker volume allows you to persist data across docker container instances.
42+
```
43+
### Create a volume on which to build source-build
44+
docker volume create source-build-volume
45+
46+
### Clone source-build repo
47+
docker run --rm --mount source=source-build-volume,target=/src -w /src <imageName> /bin/bash -c "git clone https://github.com/dotnet/source-build"
48+
49+
### Build source-build to create a tarball
50+
docker run --rm --mount source=source-build-volume,target=/src -w /src/source-build <imageName> /bin/bash -c "./build-source-tarball.sh ../tarball"
51+
52+
### Build the tarball
53+
docker run --rm --mount source=source-build-volume,target=/src -w /src/tarball <imageName> /bin/bash -c "./build.sh"
54+
55+
### Run smoke tests
56+
docker run --rm --mount source=source-build-volume,target=/src -w /src/tarball <imageName> /bin/bash -c "./smoke-test.sh"
57+
58+
### Run an interactive container with the docker volume
59+
docker run -it --rm --mount source-build-volume,target=/src -w /src <imageName> /bin/bash
60+
61+
### Remove a volume when finished with it
62+
docker volume rm source-build-volume
63+
```

docker/build-docker-images.cmd

Lines changed: 0 additions & 22 deletions
This file was deleted.

docker/build-docker-images.sh

Lines changed: 0 additions & 18 deletions
This file was deleted.

docker/centos.7/Dockerfile

Lines changed: 0 additions & 28 deletions
This file was deleted.

docker/fedora.23/Dockerfile

Lines changed: 0 additions & 25 deletions
This file was deleted.

docker/ubuntu.14.04/Dockerfile

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)