Skip to content

CentOS 7 docker based image #1571

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Mar 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,8 @@ Task("Docker-Build")
{
DockerBuild("linux", "debian", "netcoreapp2.1", parameters);
DockerBuild("linux", "debian", "net472", parameters);
DockerBuild("linux", "centos7", "netcoreapp2.1", parameters);
DockerBuild("linux", "fedora27", "netcoreapp2.1", parameters);
}
});

Expand Down Expand Up @@ -637,6 +639,8 @@ Task("Publish-DockerHub")
{
DockerPush("linux", "debian", "netcoreapp2.1", parameters);
DockerPush("linux", "debian", "net472", parameters);
DockerPush("linux", "centos7", "netcoreapp2.1", parameters);
DockerPush("linux", "fedora27", "netcoreapp2.1", parameters);
}

DockerLogout();
Expand Down
3 changes: 2 additions & 1 deletion src/Docker/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- based on **microsoft/dotnet:2.1-runtime** - Windows dotnet core
- based on **mono:5.18** - Linux Full FX - on mono
- based on **microsoft/dotnet:2.1-runtime** - Linux dotnet core
- based on **cenots:7** - linux dotnet core

To run on windows container run this
`docker run --rm -v "$(pwd):c:/repo" gittools/gitversion:latest-windows-net472 c:/repo`
Expand All @@ -13,4 +14,4 @@ To run on windows container run this
To run on linux container run this
`docker run --rm -v "$(pwd):/repo" gittools/gitversion:latest-linux-net472 /repo`

`docker run --rm -v "$(pwd):/repo" gittools/gitversion:latest-linux-netcoreapp2.1 /repo`
`docker run --rm -v "$(pwd):/repo" gittools/gitversion:latest-linux-netcoreapp2.1 /repo`
21 changes: 21 additions & 0 deletions src/Docker/linux/centos7/netcoreapp2.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM centos:7
LABEL maintainers="GitTools Maintainers"

ENV DOTNET_VERSION='2.1'
ARG contentFolder

# https://dotnet.microsoft.com/download/linux-package-manager/rhel/sdk-current
RUN rpm -Uvh https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm \
&& yum update cache

# if you need SDK use dotnet-sdk-$DOTNET_VERSION
RUN yum install -y dotnet-runtime-$DOTNET_VERSION.x86_64 unzip libgit2-devel.x86_64 \
&& yum clean all \
&& rm -rf /tmp/*

RUN ln -s /usr/lib64/libgit2.so /usr/lib64/libgit2-15e1193.so

WORKDIR /app
COPY $contentFolder/ ./

ENTRYPOINT ["dotnet", "GitVersion.dll"]
20 changes: 20 additions & 0 deletions src/Docker/linux/fedora27/netcoreapp2.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM fedora:27
LABEL maintainers="GitTools Maintainers"

ENV DOTNET_VERSION='2.1'
ARG contentFolder

# https://dotnet.microsoft.com/download/linux-package-manager/rhel/sdk-current
RUN rpm -Uvh https://packages.microsoft.com/config/fedora/27/packages-microsoft-prod.rpm

# if you need SDK use dotnet-sdk-$DOTNET_VERSION
RUN yum install -y dotnet-runtime-$DOTNET_VERSION.x86_64 unzip libgit2-devel.x86_64 \
&& yum clean all \
&& rm -rf /tmp/*

RUN ln -s /usr/lib64/libgit2.so /usr/lib64/libgit2-15e1193.so

WORKDIR /app
COPY $contentFolder/ ./

ENTRYPOINT ["dotnet", "GitVersion.dll"]