Skip to content
This repository has been archived by the owner on Jun 2, 2023. It is now read-only.

Docker installation problem #592

Closed
DSantonastaso opened this issue Sep 1, 2020 · 13 comments
Closed

Docker installation problem #592

DSantonastaso opened this issue Sep 1, 2020 · 13 comments
Labels
wontfix Problem, or not; this won't be fixed here at least.

Comments

@DSantonastaso
Copy link

PassCore Server

OS: Linux UBUNTU 18.04LTS
Provider: Active Directory
Settings file (without sensitive information): n/a
Log file (without sensitive information): n/a
Describe the bug
When running:
docker build --rm -t passcore .

Error:
Sending build context to Docker daemon 787.5kB
Step 1/12 : ARG DOTNET_VERSION=3.1
Step 2/12 : FROM mcr.microsoft.com/dotnet/core/sdk:$DOTNET_VERSION-alpine3.9 AS build
manifest for mcr.microsoft.com/dotnet/core/sdk:3.1-alpine3.9 not found: manifest unknown: manifest tagged by "3.1-alpine3.9" is not found

@seancallaway
Copy link

seancallaway commented Sep 1, 2020

Can confirm same issue.

EDIT: It appears that this tag has been removed from the .NET Core SDK registry. The oldest tag available is -alpine3.11 but that version doesn't provide the correct version of nodejs.

@voducthoitc888
Copy link

Same me problem, hope have step on this. thanks !

@vintury
Copy link

vintury commented Oct 29, 2020

Hello.
Today available -alpine3.10 you can use this image for build Docker image.

@mcowart123
Copy link

mcowart123 commented Oct 29, 2020

Trying this again today, and am having this issue (on MacOS 10.15.7):

docker build --rm -t passcore .

Sending build context to Docker daemon 6.291MB
Step 1/12 : ARG DOTNET_VERSION=3.1
Step 2/12 : FROM mcr.microsoft.com/dotnet/core/sdk:$DOTNET_VERSION-alpine AS build
---> b003ab77b035
Step 3/12 : RUN apk add --no-cache icu-libs nodejs=10.19.0-r0 nodejs-npm
---> Running in e6f8595bf961
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/community/x86_64/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:
nodejs-12.18.4-r0:
breaks: world[nodejs=10.19.0-r0]
satisfies: npm-12.18.4-r0[nodejs]
The command '/bin/sh -c apk add --no-cache icu-libs nodejs=10.19.0-r0 nodejs-npm' returned a non-zero code: 2

EDIT: Never mind; I had updated the Dockerfile previously trying to get it to work earlier and had broken it. Pulled clean and changed to 3.10 and trying a build now.

@vintury
Copy link

vintury commented Oct 30, 2020

@mcowart123 your ci don't use variable $DOTNET_VERSION, you can see it in your log:

Step 2/12 : FROM mcr.microsoft.com/dotnet/core/sdk:$DOTNET_VERSION-alpine AS build

I build image with this docker file:

FROM mcr.microsoft.com/dotnet/core/sdk:3.1-alpine3.10 AS build
RUN apk add --no-cache \
    icu-libs \
    nodejs=10.19.0-r0 \
    nodejs-npm
WORKDIR /build
COPY . .
RUN dotnet restore
RUN dotnet publish -c Release -o /publish /p:PASSCORE_PROVIDER=LDAP

FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-alpine3.10 AS release
WORKDIR /app
COPY --from=build /publish .
EXPOSE 80
CMD ["dotnet", "/app/Unosquare.PassCore.Web.dll"]

For run passcore you can use this docker-compose.yaml:

version: '2.0'
services:
  passcore:
    container_name: passcore
    image: $your_repo/passcore:latest
    environment:
      - AppSettings__LdapHostnames__0=ad-dc01.example.com
      - AppSettings__LdapPort=389
      - AppSettings__LdapUsername='CN=adm,OU=TechUsers,OU=Users,DC=example,DC=com'
      - AppSettings__LdapPassword='adm_pass'
      - AppSettings__DefaultDomain='example.com'
      - ClientSettings__UseEmail=false
    ports:
      - 80:80

But docker file can't work in my infrastructure. I have error:
warn: PassCoreLDAPProvider[0] Unexpected Win32 API error; error code: 80090308

Maybe you can get it to work. I could not do it.

@vintury
Copy link

vintury commented Oct 30, 2020

@geoperez maybe docker containers have some requirements for fix my err?

@hawatius
Copy link

hawatius commented Nov 6, 2020

The same error in docker Unexpected Win32 API error; error code: 80090308
Can anyone help?

@jlynch93
Copy link

Has anyone found a way to resolve this issue?

@geoperez
Copy link
Member

I updated the docker file, please check the new one.

@stale
Copy link

stale bot commented Feb 24, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix Problem, or not; this won't be fixed here at least. label Feb 24, 2021
@stale stale bot closed this as completed Jun 2, 2021
@stevleibelt
Copy link

stevleibelt commented Feb 2, 2023

Fixed it by adapting the Docker file. See issue/671.

  • Remove the line RUN dotnet restore
  • Adapte the line RUN dotnet publish -c Release -o /app /p:PASSCORE_PROVIDER=LDAP --no-restore and remove --no-restore

After that change, I was able to build and run it on an debian 11 machine.

@geoperez
Copy link
Member

geoperez commented Feb 2, 2023

The suggestion was applied: 6948c23

@stevleibelt
Copy link

@geoperez Thanks for the update. I must admit, I have no idea what this suggestion is doing/results into.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
wontfix Problem, or not; this won't be fixed here at least.
Projects
None yet
Development

No branches or pull requests

9 participants