Docker Community Forums

Share and learn in the Docker community.

I'm having trouble finding an exectuable file when runnind docker-compose up? [solved]


#1

Okay me having some issue with docker… Here’s the lay down, I’ve made a docker-compose.yml file, this file contains 2 services my client and server… the file looks something like this

version: '3'
services:
   server-service:
      build: ./server
      volumes:
         - ./server:/usr/file-moe/server
      ports:
         - 5000:80
         
   web-service:
      build: ./client
      volumes:
         - ./website:/usr/file-moe/client
      ports: 
         - 3000:80
      depends_on:
         - server-service

And when I run docker-compose up It errors it cannot find the file…

ERROR: for filemoe_server-service_1_a6e6686d8f3e  Cannot start service server-service: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"./target/release/moe-server\": stat ./target/release/moe-server: no such file or directory": unknown

ERROR: for server-service  Cannot start service server-service: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"./target/release/moe-server\": stat ./target/release/moe-server: no such file or directory": unknown
ERROR: Encountered errors while bringing up the project.

When it first came up, I was like… maybe I fucked something up, but actually I ls and cd and I found the files… in there… then I was like what? maybe my Dockerfile is wrong?

FROM liuchong/rustup:stable

WORKDIR /usr/file-moe/server

COPY . .

RUN apt-get update && \
 	apt-get upgrade && \
	apt-get install -y \
	build-essential \
	pkg-config \
   	libssl-dev \
	libpq-dev 

RUN rustup update && cargo update

RUN rustup default nightly 
RUN rustup override set nightly

RUN cargo build --release

CMD ["./target/release/moe-server"]

The OS i’m doing this on is Debain 9.


#2

Okay I’ve fixed the problem, it was my dumbass fault :sweat_smile:… so basically for anyone wondering I was overwriting the /usr/file-moe/server directory… with something else that’s why it cannot find th thingy but it’s cool now…