Build failed
cicerorph
HOBBYOP

3 months ago

Hello! I just made a project and I wanted to try to use railpack for the first time after nixpack, but for some reason /app doesn't seem to exist when building..

My railpack.json:

{
  "$schema": "https://schema.railpack.com",
  "packages": {
    "java": "21"
  },
  "steps": {
    "download-config": {
      "inputs": [
        {
          "image": "alpine:latest"
        }
      ],
      "commands": [
        {
          "cmd": "apk add --no-cache curl",
          "customName": "install curl"
        },
        {
          "cmd": "curl -o /app/application.yml [URL HERE | REMOVED FOR POST]",
          "customName": "install application.yml"
        },
        {
          "cmd": "ls -la /app/",
          "customName": "check files"
        }
      ]
    }
  },
  "deploy": {
    "base": {
      "image": "ghcr.io/lavalink-devs/lavalink:4"
    },
    "inputs": [
      {
        "step": "packages:java",
        "include": ["."]
      },
      {
        "step": "download-config",
        "include": ["/app/application.yml"]
      },
      {
        "local": true,
        "include": ["start.sh"]
      }
    ],
    "startCommand": "bash start.sh",
    "variables": {
      "SERVER_PORT": "2333",
      "LAVALINK_SERVER_PASSWORD": "${LAVALINK_SERVER_PASSWORD:-youshallnotpass}"
    }
  }
}

Error logs:

$10 Bounty

16 Replies

cicerorph
HOBBYOP

3 months ago

help pls


domehane
FREETop 5% Contributor

3 months ago

where is error logs ??


cicerorph
HOBBYOP

3 months ago

Check the last messages.


cicerorph
HOBBYOP

3 months ago

025-12-26T13:43:43.046849758Z [inf]  install curl
2025-12-26T13:43:43.388893388Z [err]  copy /app
2025-12-26T13:43:43.728989856Z [err]  install curl
2025-12-26T13:43:43.762455698Z [err]  Build Failed: build daemon returned an error < failed to solve: lstat /app: no such file or directory >

domehane
FREETop 5% Contributor

3 months ago

okay change railpack.json to this :

{

"$schema": "https://schema.railpack.com",

"steps": {

"download-config": {

"inputs": [

{

"image": "alpine:latest"

}

],

"commands": [

{

"cmd": "apk add --no-cache curl",

"customName": "install curl"

},

{

"cmd": "mkdir -p /config",

"customName": "create config directory"

},

{

"cmd": "curl -o /config/application.yml https://yyf.mubilop.com/file/5f4cceb8/application.yml",

"customName": "download application.yml"

},

{

"cmd": "ls -la /config/",

"customName": "check files"

}

]

}

},

"deploy": {

"base": {

"image": "ghcr.io/lavalink-devs/lavalink:4"

},

"inputs": [

{

"step": "download-config",

"include": ["/config/application.yml"]

},

{

"local": true,

"include": ["start.sh"]

}

],

"startCommand": "bash start.sh",

"variables": {

"SERVER_PORT": "2333",

"LAVALINK_SERVER_PASSWORD": "${LAVALINK_SERVER_PASSWORD:-youshallnotpass}"

}

}

}


cicerorph
HOBBYOP

3 months ago

Now it works, but the project needs Java.


cicerorph
HOBBYOP

3 months ago

And the files used aren't on the app folder aswell


cicerorph
HOBBYOP

3 months ago

Starting Container
Initializing...
application.yml not found, downloading.
start.sh: line 7: curl: command not found
downloaded
configurating pass
sed: can't read application.yml: No such file or directory
configurating port: 2333
sed: can't read application.yml: No such file or directory
now initializing project jar

domehane
FREETop 5% Contributor

3 months ago

ok wait


cicerorph
HOBBYOP

3 months ago

Same error as before.

╭─────────────────╮
│ Railpack 0.15.4 │
╰─────────────────╯

  ↳ Using config file `railpack.json`
  ⚠ The config file format is not yet finalized and subject to change.
  ↳ Detected Shell
  ↳ Using shell script: start.sh with interpreter: bash

  Packages  
  ──────────
  java  │  21.0.2  │  custom config (21)

  Steps     
  ──────────
  ▸ download-config
    $ install curl
    $ create downloads directory
    $ download application.yml
    $ check files

  Deploy    
  ──────────
    $ bash start.sh


load build definition from ./railpack-plan.json
0ms

docker-image://docker.io/library/alpine:latest cached
285ms

copy /app
1s

install curl
189ms
Build Failed: build daemon returned an error < failed to solve: lstat /app: no such file or directory >

cicerorph
HOBBYOP

3 months ago

I will try nixpack


domehane
FREETop 5% Contributor

3 months ago

/app doesn't exist during the build steps, and files need to be properly transferred to the final container


cicerorph
HOBBYOP

3 months ago

╭─────────────────╮
│ Railpack 0.15.4 │
╰─────────────────╯

  ↳ Using config file `railpack.json`
  ⚠ The config file format is not yet finalized and subject to change.
  ↳ Detected Shell
  ↳ Using shell script: start.sh with interpreter: bash

  Packages  
  ──────────
  java  │  21.0.2  │  custom config (21)

  Steps     
  ──────────
  ▸ download-config
    $ install curl
    $ create config directory
    $ download application.yml

  Deploy    
  ──────────
    $ bash /app/start.sh


load build definition from ./railpack-plan.json
0ms

docker-image://docker.io/library/alpine:latest cached
152ms

copy /app
635ms

install curl
331ms
Build Failed: build daemon returned an error < failed to solve: lstat /app: no such file or directory >

domehane
FREETop 5% Contributor

3 months ago

try this fixed version:

{
  "$schema": "https://schema.railpack.com",
  "packages": {
    "java": "21"
  },
  "steps": {
    "download-config": {
      "inputs": [
        {
          "image": "alpine:latest"
        }
      ],
      "commands": [
        {
          "cmd": "apk add --no-cache curl",
          "customName": "install curl"
        },
        {
          "cmd": "mkdir -p /tmp/config",
          "customName": "create config directory"
        },
        {
          "cmd": "curl -o /tmp/config/application.yml [THEIR_URL]",
          "customName": "download application.yml"
        }
      ]
    }
  },
  "deploy": {
    "base": {
      "image": "ghcr.io/lavalink-devs/lavalink:4"
    },
    "inputs": [
      {
        "step": "download-config",
        "include": ["/tmp/config/application.yml"],
        "dest": "/app/application.yml"
      },
      {
        "local": true,
        "include": ["start.sh"],
        "dest": "/app/start.sh"
      }
    ],
    "installCommand": "apt-get update && apt-get install -y curl sed openjdk-21-jre-headless",
    "startCommand": "bash /app/start.sh",
    "variables": {
      "SERVER_PORT": "2333",
      "LAVALINK_SERVER_PASSWORD": "${LAVALINK_SERVER_PASSWORD:-youshallnotpass}"
    }
  }
}

ilyassbreth
FREE

3 months ago

it works ?


cicerorph
HOBBYOP

3 months ago

no, changed to nixpack


Loading...