use new base image for build & release

This commit is contained in:
TGP 2022-01-20 15:12:05 +00:00
parent 69bd9a8548
commit c07e6ee41f
5 changed files with 21 additions and 4 deletions

View File

@ -4,13 +4,13 @@ orbs:
jobs:
build:
docker:
- image: mcr.microsoft.com/dotnet/sdk:6.0-alpine
- image: mijitt0m/ocelot-build:0.0.5
steps:
- checkout
- run: dotnet tool restore && dotnet cake
release:
docker:
- image: mcr.microsoft.com/dotnet/sdk:6.0-alpine
- image: mijitt0m/ocelot-build:0.0.5
steps:
- checkout
- run: dotnet tool restore && dotnet cake --target=Release

10
docker/Dockerfile.base Normal file
View File

@ -0,0 +1,10 @@
# syntax=docker/dockerfile:1
FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine
RUN apk add bash icu-libs krb5-libs libgcc libintl libssl1.1 libstdc++ zlib
RUN curl -L --output ./dotnet-install.sh https://dot.net/v1/dotnet-install.sh
RUN chmod u+x ./dotnet-install.sh
RUN ./dotnet-install.sh -c 5.0

View File

@ -2,7 +2,7 @@
# call from ocelot repo root with
# docker build --platform linux/arm64 --build-arg OCELOT_COVERALLS_TOKEN=$OCELOT_COVERALLS_TOKEN -f ./docker/Dockerfile.build .
# docker build --platform linux/amd64 --build-arg OCELOT_COVERALLS_TOKEN=$OCELOT_COVERALLS_TOKEN -f ./docker/Dockerfile.build .
FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine AS build-env
FROM mijitt0m/ocelot-build:0.0.5
ARG OCELOT_COVERALLS_TOKEN

View File

@ -2,7 +2,7 @@
# call from ocelot repo root with
# docker build --platform linux/arm64 --build-arg OCELOT_COVERALLS_TOKEN=$OCELOT_COVERALLS_TOKEN --build-arg OCELOT_GITHUB_API_KEY=$OCELOT_GITHUB_API_KEY --build-arg OCELOT_COVERALLS_TOKEN=$OCELOT_COVERALLS_TOKEN -f ./docker/Dockerfile.build .
# docker build --platform linux/amd64 --build-arg OCELOT_COVERALLS_TOKEN=$OCELOT_COVERALLS_TOKEN --build-arg OCELOT_GITHUB_API_KEY=$OCELOT_GITHUB_API_KEY --build-arg OCELOT_COVERALLS_TOKEN=$OCELOT_COVERALLS_TOKEN -f ./docker/Dockerfile.build .
FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine AS build-env
FROM mijitt0m/ocelot-build:0.0.5
ARG OCELOT_COVERALLS_TOKEN
ARG OCELOT_NUTGET_API_KEY

7
docker/build.sh Executable file
View File

@ -0,0 +1,7 @@
# this script build the ocelot docker file
version=0.0.5
docker build --platform linux/amd64 -t mijitt0m/ocelot-build -f Dockerfile.base .
echo $DOCKER_PASS | docker login -u $DOCKER_USER --password-stdin
docker tag mijitt0m/ocelot-build mijitt0m/ocelot-build:$version
docker push mijitt0m/ocelot-build:latest
docker push mijitt0m/ocelot-build:$version