Many images do not build with docker build
neilpeterson opened this issue · 3 comments
neilpeterson commented
Each image seems to build fine when using docker-compose, however many fail when using docker build.
Example: Image Classifier
$ docker build -t imageclassifier .
Sending build context to Docker daemon 5.875MB
Step 1/24 : ARG sdkTag=2.2
Step 2/24 : ARG runtimeTag=2.2
Step 3/24 : ARG image=mcr.microsoft.com/dotnet/core/aspnet
Step 4/24 : ARG sdkImage=mcr.microsoft.com/dotnet/core/sdk
Step 5/24 : FROM ${image}:${runtimeTag} AS base
---> 34973cab5999
Step 6/24 : WORKDIR /app
---> Using cache
---> 52c754c1ce15
Step 7/24 : EXPOSE 80
---> Using cache
---> 95d3bb996f26
Step 8/24 : RUN apt-get update && apt-get install -y --allow-unauthenticated libc6-dev libgdiplus libx11-dev && rm -rf /var/lib/apt/lists/*
---> Using cache
---> 7bcf59ae9eb3
Step 9/24 : FROM ${sdkImage}:${sdkTag} AS build
---> 08657316a4cd
Step 10/24 : WORKDIR /src
---> Using cache
---> dd6eca0d07bf
Step 11/24 : COPY ./Directory.Build.props .
COPY failed: stat /var/lib/docker/tmp/docker-builder393851329/Directory.Build.props: no such file or directory
This also appears to be an issue with the profile.api
, products.api
, webff
and login.api
.
I am trying to accomplish this so that I can use Azure Container Registry Tasks to build these images in a pipeline. I'm unfortunately not able to pinpoint the issue with the Dockerfile and docker build command.
Any assistance would be appreciated.
neilpeterson commented
Looks like since pr #55 that docker-compose
fails on the popular products api.
Example output from docker-compose up
.
Removing intermediate container 88ab255b2107
---> 707cda6171a0
Step 8/12 : COPY Services/Tailwind.Traders.PopularProduct.Api .
---> 5b5d931cbf6e
Step 9/12 : RUN go get .
---> Running in ea89b363410f
go: finding github.com/microsoft/ApplicationInsights-Go/appinsights latest
go: finding github.com/microsoft/ApplicationInsights-Go v0.4.2
go: downloading github.com/microsoft/ApplicationInsights-Go v0.4.2
go: extracting github.com/microsoft/ApplicationInsights-Go v0.4.2
# github.com/you/tailwindtraderspopularproducts
./main.go:18:45: undefined: config
ERROR: Service 'popular-product.api' failed to build: The command '/bin/sh -c go get .' returned a non-zero code: 2
neilpeterson commented
No worries at all. Looks good now, all images built successfully.
Thanks a bunch.