R
Railway16mo ago
Satan1c

Container Start Failure! "docker": executable file not found in $PATH: unknown

Tried to add Docker? but got error Here full log:
Sticky cache enabled
=========================
Using Detected Dockerfile
=========================
context: e92eeebadef5d576980bcd73c1c31616
#1 [internal] load .dockerignore
#1 transferring context: 52B done
#1 DONE 0.1s


#2 [internal] load build definition from Dockerfile
#2 transferring dockerfile: 568B done

#2 DONE 0.2s


#3 [internal] load metadata for mcr.microsoft.com/dotnet/sdk:7.0

#3 DONE 0.1s

#4 [build 1/4] FROM mcr.microsoft.com/dotnet/sdk:7.0@sha256:f712881bafadf0e56250ece1da28ba2baedd03fb3dd49a67f209f9d0cf928e81
#4 CACHED

#5 [internal] load build context

#5 transferring context: 137.15kB 0.0s done
#5 DONE 0.1s

#6 [build 2/4] WORKDIR /app

#6 DONE 0.2s

#7 [build 3/4] COPY . .

#7 DONE 0.1s

#8 [build 4/4] RUN dotnet restore && dotnet publish ./Geno/Geno.csproj -o ./Geno/bin/Publish/linux-x64/ -c Release -r linux-x64 --sc /p:PublishReadyToRun=true /p:PublishSingleFile=true /p:PublishTrimmed=true /p:IncludeAllContent=true /p:ForSelfExtract=true /p:IncludeNativeLibrariesForSelfExtract=true

#8 1.837 Determining projects to restore...

#8 4.194 Restored /app/ShikimoriService/ShikimoriService.csproj (in 1.88 sec).
#8 4.195 Restored /app/Localization/Localization.csproj (in 1.88 sec).
#8 4.195 Restored /app/WaifuPicsApi/WaifuPicsApi.csproj (in 1.88 sec).

#8 8.009 Restored /app/Database/Database.csproj (in 5.71 sec).

#8 8.105 Restored /app/Geno/Geno.csproj (in 5.8 sec).

#8 8.445 MSBuild version 17.5.0+6f08c67f3 for .NET

#8 9.203 Determining projects to restore...

#8 12.41 Restored /app/WaifuPicsApi/WaifuPicsApi.csproj (in 2.4 sec).
#8 12.41 Restored /app/Localization/Localization.csproj (in 2.4 sec).
#8 12.41 Restored /app/ShikimoriService/ShikimoriService.csproj (in 2.4 sec).
#8 12.41 Restored /app/Database/Database.csproj (in 2.41 sec).

#8 13.01 Restored /app/Geno/Geno.csproj (in 3.02 sec).

#8 16.38 /app/Localization/RefList.cs(123,11): warning CS8601: Possible null reference assignment. [/app/Localization/Localization.csproj]
#8 16.38 /app/Localization/CommandsLocalizationManager.cs(72,16): warning CS8619: Nullability of reference types in value of type 'string' doesn't match target type 'string?'. [/app/Localization/Localization.csproj]
#8 16.40 WaifuPicsApi -> /app/WaifuPicsApi/bin/Release/net7.0/WaifuPicsApi.dll
#8 16.43 ShikimoriService -> /app/ShikimoriService/bin/Release/net7.0/ShikimoriService.dll

#8 16.45 Localization -> /app/Localization/bin/Release/net7.0/Localization.dll
#8 16.47 Database -> /app/Database/bin/Release/net7.0/Database.dll

#8 18.14 Geno -> /app/Geno/bin/Release/net7.0/linux-x64/Geno.dll

#8 18.42 Optimizing assemblies for size. This process might take a while.

#8 311.6 Geno -> /app/Geno/bin/Publish/linux-x64/

#8 DONE 312.2s


#9 [runtime 3/3] COPY --from=build /app/Geno/bin/Publish/linux-x64 /app

#9 DONE 0.5s

#10 exporting to image
#10 exporting layers

#10 exporting layers 1.1s done

#10 writing image sha256:8e02e48244943c0651c7a3b64795a3418dbf06c47f9650cc291ca26783875978 done
#10 naming to us-west1-docker.pkg.dev/railway-infra/railway-docker-users/project/492b874c-18a2-4eda-a8d8-14314830411f/service/8f5954a7-39af-46b0-bce7-5503a237e2bf:b0ef7b21-c85c-48ff-93f8-7b869b287adb 0.0s done
#10 DONE 1.1s

Build time: 315.56 seconds

================
Publishing Image
================

Pushing [==================================================>] 198.7MB d45653d2a724
Pushed d45653d2a724
b0ef7b21-c85c-48ff-93f8-7b869b287adb: digest: sha256:38bf83ba6d597a3a9c13168119c1483e6eb59e06b6d152162ab71a727b81cd49 size: 2428

Publish time: 11.60 seconds

========================
Container Start Failure!
========================
rpc error: code = Unknown desc = Error response from daemon: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "docker": executable file not found in $PATH: unknown
Sticky cache enabled
=========================
Using Detected Dockerfile
=========================
context: e92eeebadef5d576980bcd73c1c31616
#1 [internal] load .dockerignore
#1 transferring context: 52B done
#1 DONE 0.1s


#2 [internal] load build definition from Dockerfile
#2 transferring dockerfile: 568B done

#2 DONE 0.2s


#3 [internal] load metadata for mcr.microsoft.com/dotnet/sdk:7.0

#3 DONE 0.1s

#4 [build 1/4] FROM mcr.microsoft.com/dotnet/sdk:7.0@sha256:f712881bafadf0e56250ece1da28ba2baedd03fb3dd49a67f209f9d0cf928e81
#4 CACHED

#5 [internal] load build context

#5 transferring context: 137.15kB 0.0s done
#5 DONE 0.1s

#6 [build 2/4] WORKDIR /app

#6 DONE 0.2s

#7 [build 3/4] COPY . .

#7 DONE 0.1s

#8 [build 4/4] RUN dotnet restore && dotnet publish ./Geno/Geno.csproj -o ./Geno/bin/Publish/linux-x64/ -c Release -r linux-x64 --sc /p:PublishReadyToRun=true /p:PublishSingleFile=true /p:PublishTrimmed=true /p:IncludeAllContent=true /p:ForSelfExtract=true /p:IncludeNativeLibrariesForSelfExtract=true

#8 1.837 Determining projects to restore...

#8 4.194 Restored /app/ShikimoriService/ShikimoriService.csproj (in 1.88 sec).
#8 4.195 Restored /app/Localization/Localization.csproj (in 1.88 sec).
#8 4.195 Restored /app/WaifuPicsApi/WaifuPicsApi.csproj (in 1.88 sec).

#8 8.009 Restored /app/Database/Database.csproj (in 5.71 sec).

#8 8.105 Restored /app/Geno/Geno.csproj (in 5.8 sec).

#8 8.445 MSBuild version 17.5.0+6f08c67f3 for .NET

#8 9.203 Determining projects to restore...

#8 12.41 Restored /app/WaifuPicsApi/WaifuPicsApi.csproj (in 2.4 sec).
#8 12.41 Restored /app/Localization/Localization.csproj (in 2.4 sec).
#8 12.41 Restored /app/ShikimoriService/ShikimoriService.csproj (in 2.4 sec).
#8 12.41 Restored /app/Database/Database.csproj (in 2.41 sec).

#8 13.01 Restored /app/Geno/Geno.csproj (in 3.02 sec).

#8 16.38 /app/Localization/RefList.cs(123,11): warning CS8601: Possible null reference assignment. [/app/Localization/Localization.csproj]
#8 16.38 /app/Localization/CommandsLocalizationManager.cs(72,16): warning CS8619: Nullability of reference types in value of type 'string' doesn't match target type 'string?'. [/app/Localization/Localization.csproj]
#8 16.40 WaifuPicsApi -> /app/WaifuPicsApi/bin/Release/net7.0/WaifuPicsApi.dll
#8 16.43 ShikimoriService -> /app/ShikimoriService/bin/Release/net7.0/ShikimoriService.dll

#8 16.45 Localization -> /app/Localization/bin/Release/net7.0/Localization.dll
#8 16.47 Database -> /app/Database/bin/Release/net7.0/Database.dll

#8 18.14 Geno -> /app/Geno/bin/Release/net7.0/linux-x64/Geno.dll

#8 18.42 Optimizing assemblies for size. This process might take a while.

#8 311.6 Geno -> /app/Geno/bin/Publish/linux-x64/

#8 DONE 312.2s


#9 [runtime 3/3] COPY --from=build /app/Geno/bin/Publish/linux-x64 /app

#9 DONE 0.5s

#10 exporting to image
#10 exporting layers

#10 exporting layers 1.1s done

#10 writing image sha256:8e02e48244943c0651c7a3b64795a3418dbf06c47f9650cc291ca26783875978 done
#10 naming to us-west1-docker.pkg.dev/railway-infra/railway-docker-users/project/492b874c-18a2-4eda-a8d8-14314830411f/service/8f5954a7-39af-46b0-bce7-5503a237e2bf:b0ef7b21-c85c-48ff-93f8-7b869b287adb 0.0s done
#10 DONE 1.1s

Build time: 315.56 seconds

================
Publishing Image
================

Pushing [==================================================>] 198.7MB d45653d2a724
Pushed d45653d2a724
b0ef7b21-c85c-48ff-93f8-7b869b287adb: digest: sha256:38bf83ba6d597a3a9c13168119c1483e6eb59e06b6d152162ab71a727b81cd49 size: 2428

Publish time: 11.60 seconds

========================
Container Start Failure!
========================
rpc error: code = Unknown desc = Error response from daemon: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "docker": executable file not found in $PATH: unknown
18 Replies
Percy
Percy16mo ago
Project ID: 492b874c-18a2-4eda-a8d8-14314830411f,8f5954a7-39af-46b0-bce7-5503a237e2bf,b0ef7b21-c85c-48ff-93f8-7b869b287adb,b0ef7b21-c85c-48ff-93f8-7b869b287adb
Satan1c
Satan1c16mo ago
492b874c-18a2-4eda-a8d8-14314830411f
Ray
Ray16mo ago
What's your start command/entrypoint?
Satan1c
Satan1c16mo ago
Entrypoint was ["./Geno"] I guess I'll not to use publish anymore cuz there's much troubles then to find my json/csv files for now it's not as simple as I'd like, on my Machine they r in ../../ from build folder, but on host they r in ../../../ but for publish... I'll need to copy them from their folders, or somehow specify full path to them with new Docker file, and run command railway run, got new error ======================== Container Start Failure! ======================== rpc error: code = Unknown desc = Error response from daemon: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "railway": executable file not found in $PATH: unknown
Brody
Brody16mo ago
send you dockerfile
Satan1c
Satan1c16mo ago
FROM mcr.microsoft.com/dotnet/runtime:7.0 AS base
COPY ["Geno/bin/Localizations", "root/.net/Localizations"]
WORKDIR /app

FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
WORKDIR /src
COPY ["Geno/Geno.csproj", "Geno/"]
COPY ["Database/Database.csproj", "Database/"]
COPY ["Localization/Localization.csproj", "Localization/"]
COPY ["ShikimoriService/ShikimoriService.csproj", "ShikimoriService/"]
COPY ["WaifuPicsApi/WaifuPicsApi.csproj", "WaifuPicsApi/"]
RUN dotnet restore "Geno/Geno.csproj"
COPY . .
WORKDIR "/src/Geno"
RUN dotnet build "Geno.csproj" -c Release -o /app/build

FROM build AS publish
RUN dotnet publish "Geno.csproj" --os linux --arch x64 --sc -c Release -o /app/publish

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["./Geno"]
FROM mcr.microsoft.com/dotnet/runtime:7.0 AS base
COPY ["Geno/bin/Localizations", "root/.net/Localizations"]
WORKDIR /app

FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
WORKDIR /src
COPY ["Geno/Geno.csproj", "Geno/"]
COPY ["Database/Database.csproj", "Database/"]
COPY ["Localization/Localization.csproj", "Localization/"]
COPY ["ShikimoriService/ShikimoriService.csproj", "ShikimoriService/"]
COPY ["WaifuPicsApi/WaifuPicsApi.csproj", "WaifuPicsApi/"]
RUN dotnet restore "Geno/Geno.csproj"
COPY . .
WORKDIR "/src/Geno"
RUN dotnet build "Geno.csproj" -c Release -o /app/build

FROM build AS publish
RUN dotnet publish "Geno.csproj" --os linux --arch x64 --sc -c Release -o /app/publish

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["./Geno"]
Brody
Brody16mo ago
what are you referring to as a "run command"?
Satan1c
Satan1c16mo ago
Brody
Brody16mo ago
and why would you set that as a the start command?
Satan1c
Satan1c16mo ago
If you have a Dockerfile in your project directory, you can use railway run with no arguments to build and run your Dockerfile.
Brody
Brody16mo ago
1. thats text from the old cli 2. that is talking about running locally as long as you have a Dockerfile in your project railway will use it, and then theres no need to specify build or start commands, because for your purposes the ENTRYPOINT is now your start command
Satan1c
Satan1c16mo ago
HuTaoThink k, I'll try to remove start command then
Brody
Brody16mo ago
and update your cli too
Satan1c
Satan1c16mo ago
I don't even use cli) thx so much, now it runs properly
Brody
Brody16mo ago
then where are you reading that information? its outdated
Satan1c
Satan1c16mo ago
Brody
Brody16mo ago
okay, sorry for the confusion, ill get that removed
Satan1c
Satan1c16mo ago
HuTaoThumbsUp2