Skip to content

Commit

Permalink
Remove old docker files and add doc for using docker (#749)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
dseefeld committed Sep 6, 2018
1 parent 4f3eacd commit 7922aa8
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 119 deletions.
63 changes: 63 additions & 0 deletions docker/README.md
@@ -0,0 +1,63 @@
# Docker Images #

The following docker images have been verified to successfully build the source-build repo by:

1. Building source-build
2. Building the resulting tarball
3. Running smoke tests

| OS | Image Name | Image Source | Verified Source-build Commit / Date |
| :--- | :--- | :--- | :---: |
| 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 |
| 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 |
| 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 |

## Building source-build with Docker ##

### Running an interactive docker container ###
```
### Run a bash shell inside a docker container. All later steps run in the interactive shell.
docker run -it --rm <imageName> /bin/bash
### Clone source-build repo
git clone https://github.com/dotnet/source-build
cd source-build
### Build source-build to create a tarball
./build-source-tarball.sh ../tarball
### Build the tarball
cd ../tarball
./build.sh
### Run smoke tests
./smoke-test.sh
### Clean up the container when you're done working with the build results
exit
```

### Running with a docker volume ###
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.
```
### Create a volume on which to build source-build
docker volume create source-build-volume
### Clone source-build repo
docker run --rm --mount source=source-build-volume,target=/src -w /src <imageName> /bin/bash -c "git clone https://github.com/dotnet/source-build"
### Build source-build to create a tarball
docker run --rm --mount source=source-build-volume,target=/src -w /src/source-build <imageName> /bin/bash -c "./build-source-tarball.sh ../tarball"
### Build the tarball
docker run --rm --mount source=source-build-volume,target=/src -w /src/tarball <imageName> /bin/bash -c "./build.sh"
### Run smoke tests
docker run --rm --mount source=source-build-volume,target=/src -w /src/tarball <imageName> /bin/bash -c "./smoke-test.sh"
### Run an interactive container with the docker volume
docker run -it --rm --mount source-build-volume,target=/src -w /src <imageName> /bin/bash
### Remove a volume when finished with it
docker volume rm source-build-volume
```
22 changes: 0 additions & 22 deletions docker/build-docker-images.cmd

This file was deleted.

18 changes: 0 additions & 18 deletions docker/build-docker-images.sh

This file was deleted.

28 changes: 0 additions & 28 deletions docker/centos.7/Dockerfile

This file was deleted.

25 changes: 0 additions & 25 deletions docker/fedora.23/Dockerfile

This file was deleted.

26 changes: 0 additions & 26 deletions docker/ubuntu.14.04/Dockerfile

This file was deleted.

0 comments on commit 7922aa8

Please sign in to comment.