From 7a2cb9b6ddc626d8a02c298075613517fa84a195 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Sat, 17 Nov 2018 00:28:36 +0900 Subject: [PATCH 1/8] bump --- docker-compose-generator/docker-fragments/btcpayserver.yml | 2 +- docker-compose-generator/docker-fragments/nbxplorer.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose-generator/docker-fragments/btcpayserver.yml b/docker-compose-generator/docker-fragments/btcpayserver.yml index fb7d73f..21bea27 100644 --- a/docker-compose-generator/docker-fragments/btcpayserver.yml +++ b/docker-compose-generator/docker-fragments/btcpayserver.yml @@ -4,7 +4,7 @@ services: btcpayserver: restart: unless-stopped - image: ${BTCPAY_IMAGE:-nicolasdorier/btcpayserver:1.0.3.9} + image: ${BTCPAY_IMAGE:-nicolasdorier/btcpayserver:1.0.3.11} expose: - "49392" environment: diff --git a/docker-compose-generator/docker-fragments/nbxplorer.yml b/docker-compose-generator/docker-fragments/nbxplorer.yml index 3ab7dd8..ca5f5a1 100644 --- a/docker-compose-generator/docker-fragments/nbxplorer.yml +++ b/docker-compose-generator/docker-fragments/nbxplorer.yml @@ -4,7 +4,7 @@ services: nbxplorer: restart: unless-stopped - image: nicolasdorier/nbxplorer:1.1.0.12 + image: nicolasdorier/nbxplorer:1.1.0.18 expose: - "32838" environment: From d7a8380cca1204d9395cd2f5b4b99772e951e794 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Sat, 17 Nov 2018 01:23:24 +0900 Subject: [PATCH 2/8] bump --- docker-compose-generator/docker-fragments/btcpayserver.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose-generator/docker-fragments/btcpayserver.yml b/docker-compose-generator/docker-fragments/btcpayserver.yml index 21bea27..fd9d301 100644 --- a/docker-compose-generator/docker-fragments/btcpayserver.yml +++ b/docker-compose-generator/docker-fragments/btcpayserver.yml @@ -4,7 +4,7 @@ services: btcpayserver: restart: unless-stopped - image: ${BTCPAY_IMAGE:-nicolasdorier/btcpayserver:1.0.3.11} + image: ${BTCPAY_IMAGE:-nicolasdorier/btcpayserver:1.0.3.12} expose: - "49392" environment: From f9cc674197cf9b0a2ffd9ec41052164cc020eb8d Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Sat, 17 Nov 2018 01:43:38 +0900 Subject: [PATCH 3/8] bump --- docker-compose-generator/docker-fragments/btcpayserver.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose-generator/docker-fragments/btcpayserver.yml b/docker-compose-generator/docker-fragments/btcpayserver.yml index fd9d301..2d21904 100644 --- a/docker-compose-generator/docker-fragments/btcpayserver.yml +++ b/docker-compose-generator/docker-fragments/btcpayserver.yml @@ -4,7 +4,7 @@ services: btcpayserver: restart: unless-stopped - image: ${BTCPAY_IMAGE:-nicolasdorier/btcpayserver:1.0.3.12} + image: ${BTCPAY_IMAGE:-nicolasdorier/btcpayserver:1.0.3.13} expose: - "49392" environment: From 055b4b76c5f9595e71cec1d36cf2e2a135557121 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Sat, 17 Nov 2018 12:02:12 +0900 Subject: [PATCH 4/8] bump --- docker-compose-generator/docker-fragments/btcpayserver.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose-generator/docker-fragments/btcpayserver.yml b/docker-compose-generator/docker-fragments/btcpayserver.yml index 2d21904..3979ee4 100644 --- a/docker-compose-generator/docker-fragments/btcpayserver.yml +++ b/docker-compose-generator/docker-fragments/btcpayserver.yml @@ -4,7 +4,7 @@ services: btcpayserver: restart: unless-stopped - image: ${BTCPAY_IMAGE:-nicolasdorier/btcpayserver:1.0.3.13} + image: ${BTCPAY_IMAGE:-nicolasdorier/btcpayserver:1.0.3.15} expose: - "49392" environment: From 55f99575f8d9ba5377d857581f320be0ad0756e3 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Sat, 17 Nov 2018 12:52:06 +0900 Subject: [PATCH 5/8] bump --- docker-compose-generator/docker-fragments/btcpayserver.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose-generator/docker-fragments/btcpayserver.yml b/docker-compose-generator/docker-fragments/btcpayserver.yml index 3979ee4..59397a7 100644 --- a/docker-compose-generator/docker-fragments/btcpayserver.yml +++ b/docker-compose-generator/docker-fragments/btcpayserver.yml @@ -4,7 +4,7 @@ services: btcpayserver: restart: unless-stopped - image: ${BTCPAY_IMAGE:-nicolasdorier/btcpayserver:1.0.3.15} + image: ${BTCPAY_IMAGE:-nicolasdorier/btcpayserver:1.0.3.16} expose: - "49392" environment: From 912a0bea4648a698f50a73ab8d10bf4b20249cb6 Mon Sep 17 00:00:00 2001 From: rockstardev Date: Fri, 23 Nov 2018 07:43:34 -0600 Subject: [PATCH 6/8] Build docker-compose-generator multiarch Docker images --- .circleci/config.yml | 71 +++++++++++++++++++ .../{Dockerfile => Dockerfile.linuxamd64} | 6 +- .../Dockerfile.linuxarm32v7 | 22 ++++++ .../docker-compose-generator.sln | 18 +++-- 4 files changed, 111 insertions(+), 6 deletions(-) create mode 100644 .circleci/config.yml rename docker-compose-generator/{Dockerfile => Dockerfile.linuxamd64} (95%) create mode 100644 docker-compose-generator/Dockerfile.linuxarm32v7 diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..fb3ad99 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,71 @@ +version: 2 +jobs: + # Define in CircleCi Project Variables: $DOCKERHUB_REPO, $DOCKERHUB_USER, $DOCKERHUB_PASS + # Publish jobs require those variables + publish_docker_linuxamd64: + machine: + docker_layer_caching: true + steps: + - checkout + - run: + command: | + cd docker-compose-generator + sudo docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS + sudo docker build --pull -t $DOCKERHUB_REPO:latest-amd64 -f Dockerfile.linuxamd64 . + sudo docker push $DOCKERHUB_REPO:latest-amd64 + + publish_docker_linuxarm: + machine: + docker_layer_caching: true + steps: + - checkout + - run: + command: | + sudo docker run --rm --privileged multiarch/qemu-user-static:register --reset + # + cd docker-compose-generator + sudo docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS + sudo docker build --pull -t $DOCKERHUB_REPO:latest-arm32v7 -f Dockerfile.linuxarm32v7 . + sudo docker push $DOCKERHUB_REPO:latest-arm32v7 + + publish_docker_multiarch: + machine: + enabled: true + image: circleci/classic:201808-01 + steps: + - run: + command: | + # Turn on Experimental features + sudo mkdir $HOME/.docker + sudo sh -c 'echo "{ \"experimental\": \"enabled\" }" >> $HOME/.docker/config.json' + # + sudo docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS + # + sudo docker manifest create --amend $DOCKERHUB_REPO:latest $DOCKERHUB_REPO:latest-amd64 $DOCKERHUB_REPO:latest-arm32v7 + sudo docker manifest annotate $DOCKERHUB_REPO:latest $DOCKERHUB_REPO:latest-amd64 --os linux --arch amd64 + sudo docker manifest annotate $DOCKERHUB_REPO:latest $DOCKERHUB_REPO:latest-arm32v7 --os linux --arch arm --variant v7 + sudo docker manifest push $DOCKERHUB_REPO:latest -p + +workflows: + version: 2 + build_and_test: + jobs: + - test + + publish: + jobs: + - publish_docker_linuxamd64: + filters: + branches: + only: feature/circleci + - publish_docker_linuxarm: + filters: + branches: + only: feature/circleci + - publish_docker_multiarch: + requires: + - publish_docker_linuxamd64 + - publish_docker_linuxarm + filters: + branches: + only: feature/circleci diff --git a/docker-compose-generator/Dockerfile b/docker-compose-generator/Dockerfile.linuxamd64 similarity index 95% rename from docker-compose-generator/Dockerfile rename to docker-compose-generator/Dockerfile.linuxamd64 index 0614d7f..04b379a 100644 --- a/docker-compose-generator/Dockerfile +++ b/docker-compose-generator/Dockerfile.linuxamd64 @@ -1,3 +1,4 @@ +# FROM microsoft/dotnet:2.1.500-sdk-alpine3.7 AS builder WORKDIR /source COPY src/docker-compose-generator.csproj docker-compose-generator.csproj @@ -6,10 +7,11 @@ RUN dotnet restore COPY src/. . RUN dotnet publish --output /app/ --configuration Release +# FROM microsoft/dotnet:2.1.6-runtime-alpine3.7 -WORKDIR /app +WORKDIR /datadir -RUN mkdir /datadir +WORKDIR /app ENV APP_DATADIR=/datadir VOLUME /datadir diff --git a/docker-compose-generator/Dockerfile.linuxarm32v7 b/docker-compose-generator/Dockerfile.linuxarm32v7 new file mode 100644 index 0000000..d2deb17 --- /dev/null +++ b/docker-compose-generator/Dockerfile.linuxarm32v7 @@ -0,0 +1,22 @@ +# This is a manifest image, will pull the image with the same arch as the builder machine +FROM microsoft/dotnet:2.1.500-sdk AS builder +WORKDIR /source +COPY src/docker-compose-generator.csproj docker-compose-generator.csproj +# Cache some dependencies +RUN dotnet restore +COPY src/. . +RUN dotnet publish --output /app/ --configuration Release + +# Force the builder machine to take make an arm runtime image. This is fine as long as the builder does not run any program +FROM microsoft/dotnet:2.1.6-aspnetcore-runtime-stretch-slim-arm32v7 +WORKDIR /datadir + +WORKDIR /app +ENV APP_DATADIR=/datadir +VOLUME /datadir + +ENV INSIDE_CONTAINER=1 + +COPY --from=builder "/app" . + +ENTRYPOINT ["dotnet", "docker-compose-generator.dll"] diff --git a/docker-compose-generator/docker-compose-generator.sln b/docker-compose-generator/docker-compose-generator.sln index 31202ff..2cd718a 100644 --- a/docker-compose-generator/docker-compose-generator.sln +++ b/docker-compose-generator/docker-compose-generator.sln @@ -3,7 +3,14 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.26124.0 MinimumVisualStudioVersion = 15.0.26124.0 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "docker-compose-generator", "src/docker-compose-generator.csproj", "{0900AF35-48E8-46E2-85B3-BA3847EE0844}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "docker-compose-generator", "src\docker-compose-generator.csproj", "{0900AF35-48E8-46E2-85B3-BA3847EE0844}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Misc", "Misc", "{8C1C711D-DEF1-474C-A9F6-AAE142412528}" + ProjectSection(SolutionItems) = preProject + ..\.circleci\config.yml = ..\.circleci\config.yml + Dockerfile.linuxamd64 = Dockerfile.linuxamd64 + Dockerfile.linuxarm32v7 = Dockerfile.linuxarm32v7 + EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -14,9 +21,6 @@ Global Release|x64 = Release|x64 Release|x86 = Release|x86 EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {0900AF35-48E8-46E2-85B3-BA3847EE0844}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0900AF35-48E8-46E2-85B3-BA3847EE0844}.Debug|Any CPU.Build.0 = Debug|Any CPU @@ -31,4 +35,10 @@ Global {0900AF35-48E8-46E2-85B3-BA3847EE0844}.Release|x86.ActiveCfg = Release|Any CPU {0900AF35-48E8-46E2-85B3-BA3847EE0844}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {CADA76A8-7F2E-4132-900B-330F0D2D722B} + EndGlobalSection EndGlobal From 6ff5ee6d296f8ca13b92234175415529ea06a3bc Mon Sep 17 00:00:00 2001 From: rockstardev Date: Fri, 23 Nov 2018 07:44:44 -0600 Subject: [PATCH 7/8] Updating trigger to work on dcg-latest branch --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index fb3ad99..e970618 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -57,15 +57,15 @@ workflows: - publish_docker_linuxamd64: filters: branches: - only: feature/circleci + only: dcg-latest - publish_docker_linuxarm: filters: branches: - only: feature/circleci + only: dcg-latest - publish_docker_multiarch: requires: - publish_docker_linuxamd64 - publish_docker_linuxarm filters: branches: - only: feature/circleci + only: dcg-latest From 849593230ef3365c9a841be8aaf42487e4e6d8df Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Sat, 24 Nov 2018 13:14:49 +0900 Subject: [PATCH 8/8] no build_and_test --- .circleci/config.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e970618..89778d6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -48,10 +48,6 @@ jobs: workflows: version: 2 - build_and_test: - jobs: - - test - publish: jobs: - publish_docker_linuxamd64: