refactor more build stuff for docker

This commit is contained in:
TomPallister
2020-01-16 21:46:54 +00:00
parent 37ceea019c
commit a8a31cdb8a
7 changed files with 155 additions and 78 deletions
+1
View File
@@ -1,3 +1,4 @@
# this is the dockerfile that create the ocelot build container
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-bionic AS build
RUN apt install gnupg ca-certificates
+9
View File
@@ -0,0 +1,9 @@
FROM mijitt0m/ocelot-build:0.0.1
WORKDIR /src
COPY ./. .
RUN chmod u+x build.sh
RUN make build
+18
View File
@@ -0,0 +1,18 @@
# call from root with
# docker build --build-arg OCELOT_NUTGET_API_KEY=$OCELOT_NUTGET_API_KEY --build-arg OCELOT_GITHUB_API_KEY=$OCELOT_GITHUB_API_KEY -f ./docker/Dockerfile.release .
FROM mijitt0m/ocelot-build:0.0.1
ARG OCELOT_GITHUB_API_KEY
ARG OCELOT_NUTGET_API_KEY
ENV OCELOT_NUTGET_API_KEY=$OCELOT_NUTGET_API_KEY
ENV OCELOT_GITHUB_API_KEY=$OCELOT_GITHUB_API_KEY
WORKDIR /src
COPY ./. .
RUN chmod u+x build.sh
RUN make release
+1
View File
@@ -1,3 +1,4 @@
# this script build the ocelot docker file
docker build -t mijitt0m/ocelot-build .
echo $DOCKER_PASS | docker login -u $DOCKER_USER --password-stdin
docker tag mijitt0m/ocelot-build mijitt0m/ocelot-build:0.0.1