✅ Executing bash script in docker container with Docket.DotNet in ASP.NET website
So i need to run some script in docker container and the container crashes instantly and logs are:
I'm using Gcc:Latest docker image
The script:
63 Replies
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
the file is literally copied from the container in the green area in the screen buf i will do this in a sec
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
is it different tho?
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
ye
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
ah
like this?
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
idk it's gcc:latest
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
the container crashes instantly
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
isn't this exactly that?
im new to linux
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
so i just create a file?
then copy the script?
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
it's a whole project of something like coding portal and i do dcode execution and tests inside docker
I don't get it
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
AH
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
i see
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
ike this?
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
a
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
to the script?
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
2024-04-24 13:25:27 total 12K
2024-04-24 13:25:27 drwxr-xr-x 2 root root 4.0K Apr 24 11:25 .
2024-04-24 13:25:27 drwxr-xr-x 1 root root 4.0K Apr 24 11:25 ..
2024-04-24 13:25:27 -rwxrwxrwx 1 root root 26 Apr 24 11:25 ExaminationFile.sh
2024-04-24 13:25:27 #!/bin/bash
2024-04-24 13:25:27
2024-04-24 13:25:27 echo "foo"
2024-04-24 13:25:27 /myApp
2024-04-24 13:25:27 bash: line 3: hd: command not found
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
2024-04-24 13:26:25 total 12K
2024-04-24 13:26:25 drwxr-xr-x 2 root root 4.0K Apr 24 11:26 .
2024-04-24 13:26:25 drwxr-xr-x 1 root root 4.0K Apr 24 11:26 ..
2024-04-24 13:26:25 -rwxrwxrwx 1 root root 26 Apr 24 11:26 ExaminationFile.sh
2024-04-24 13:26:25 #!/bin/bash
2024-04-24 13:26:25
2024-04-24 13:26:25 echo "foo"
2024-04-24 13:26:25 /myApp
2024-04-24 13:26:25 bash: line 3: hexdump: command not found
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
well i can make simple method to fix this no?
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
2024-04-24 13:29:07 total 12K
2024-04-24 13:29:07 drwxr-xr-x 2 root root 4.0K Apr 24 11:29 .
2024-04-24 13:29:07 drwxr-xr-x 1 root root 4.0K Apr 24 11:29 ..
2024-04-24 13:29:07 -rwxrwxrwx 1 root root 14 Apr 24 11:29 ExaminationFile.sh
2024-04-24 13:29:07 #!/bin/bash
2024-04-24 13:29:07
2024-04-24 13:29:07 /myApp
2024-04-24 13:29:07 bash: line 2: ./ExaminationFile.sh: cannot execute: required file not found
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
:kekw:
TeBeCo
REPL Result: Success
Result: string
Compile: 275.269ms | Execution: 28.619ms | React with ❌ to remove this embed.
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
2024-04-24 13:31:42 total 12K
2024-04-24 13:31:42 drwxr-xr-x 2 root root 4.0K Apr 24 11:31 .
2024-04-24 13:31:42 drwxr-xr-x 1 root root 4.0K Apr 24 11:31 ..
2024-04-24 13:31:42 -rwxrwxrwx 1 root root 24 Apr 24 11:31 ExaminationFile.sh
2024-04-24 13:31:42 #!/bin/bash
2024-04-24 13:31:42
2024-04-24 13:31:42 echo "foo"
2024-04-24 13:31:42 /myApp
BRO
I LOVE YOU
I WAS STUCK ON THIS
FOR
A WEEK
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
it did
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
it wil ltets whole case and see if all works
but i guess it will now
it executes tho
TL:DR
Fixed issue of copying file as string to linux