AlirezaDehlaghi / ICSSIM

This is the ICSSIM source code and user manual for simulating industrial control system testbed for cybersecurity experiments
https://alirezadehlaghi.github.io/ICSSIM/
MIT License
63 stars 13 forks source link

Error during deployment #2

Closed Jderach closed 1 year ago

Jderach commented 2 years ago

Hi,

System : Ubuntu 20.04 Docker version 20.10.21, build baeda1f Docker Compose version v2.12.2

I have a problem when i want to deploy this project with this following message :

 => CANCELED [deployments-plc2 internal] load build context                                                                                                                                                                             1.1s
 => => transferring context:                                                                                                                                                                                                            3.2s
 => CANCELED [deployments-hmi3 internal] load build context                                                                                                                                                                             3.3s
 => => transferring context:                                                                                                                                                                                                            0.8s
 => [deployments-pys internal] load build context                                                                                                                                                                                       3.3s
 => CACHED [deployments-hmi2 2/7] RUN mkdir src                                                                                                                                                                                         0.0s
 => ERROR [deployments-hmi2 3/7] COPY ./src/ ./src/                                                                                                                                                                                     0.0s
 => CANCELED [deployments-plc1 internal] load build context                                                                                                                                                                             1.3s
 => => transferring context:                                                                                                                                                                                                            2.2s
------
 > [deployments-hmi2 3/7] COPY ./src/ ./src/:
------
failed to solve: failed to compute cache key: "/src" not found: not found
AlirezaDehlaghi commented 2 years ago

Because of some bugs, you must manually create the folder with the name "src" in the deploy directory and then try to deploy it.

Let me know if it works, so I can fix it.

Jderach commented 2 years ago

No it doesn't works, same issue

image

AlirezaDehlaghi commented 2 years ago

Actually, you had to create "src" folder in the docker definition files, like "ics-docker".

I updated init.sh file to do it.

Please pull the project and run it again.

Jderach commented 2 years ago

image

AlirezaDehlaghi commented 2 years ago

I know that this bug existed a while ago. But we resolved it. And our update works since your error changed after the update. A fresh clone might work. Please clean your environment and deploy it again.

toglader commented 2 years ago

I have exactly same issue and I have fresh pull of repo.

I had to add "apt-get install -y apt-utils" als to ics-docer/Dockerfile also

AlirezaDehlaghi commented 2 years ago

@toglader and @Jderach : It seems that the problem was the ownership of files. Obviously, the docker-composer cannot create "./src" file in docker folders.

I updated the "init.sh" to perform actions with "Sudo".

So please pull and try again.

toglader commented 2 years ago

For me issue was fixed by adding apt-utils to installable packages but also adding "-y" to Dockerfiles in "apt install telnet" lines