Fix a docker images? Doesn't copy entrypoint.sh file? - docker-compose

I have django+react project and I used to run it through Docker but when debug "docker-compose up" command, then appears error
"exec /usr/src/app/entrypoint.sh: no such file or directory"
Docker doesn't copy this file and after debugging, in /usr/src/ folder no existing this file.
Share it please and help

Related

VSCODE remote container - avoid reinstall extensions on rebuild

I am currently working with a remote docker container which is running locally on my computer, mainly Python.
I have several extensions listed on devcontainer.json so when the docker is build it install these package.
I am tryin to avoid reinstalling some of these extensions every time I rebuild or reopen the project.
Specially with Pylance and Python which require to reload the project within VScode.
Any suggestions?
Yo, put a volume over /root/.vscode-server or symlink the whole vscode server folder to a.tmp folder within the project, and then also put that folder into a persistant docker folume :)
# entrypoint.sh
echo "[Operation] Symlink vscode-server (for developers that use it)"
mkdir -p /app/.tmp/.vscode-server \
&& ln -s /app/.tmp/.vscode-server /root/.vscode-server
There is a detailed description on the official vscode docs:
[https://code.visualstudio.com/remote/advancedcontainers/avoid-extension-reinstalls][1]
This creates a docker volume on the host. The extensions will need to be installed inside the container only once because the files will be persisted on the host volume hence survive any container rebuilds.

While opening VisualStudio it gives me following error

I have installed Visual Studio on my Linux(Ubuntu) machine but while I am opening it gives me error like...
By deleting the directory Code inside /home/[USERNAME]/.config, you'll be able to launch VScode again.
Step by step (replace USERNAME by your username):
$ cd /home/[USERNAME]/.config
$ sudo rm -rf Code
[enter your password if needed]
Then launch VSCode. It might probably take a moment till VSCode shows up, because the deleted folder will be recreated on launch.

How can I run jupyter notebook as .sh executable in Ubuntu?

I have a lot of .ipynb file stored in one folder. I have create a .sh file which contain only code jupyter notebook. Then I have change the preference > behavior in nautilus file manager to ask each time. Then when I double click the .sh file the box appear and I select run from terminal. But It is not executing and not opening then jupyter notebook. but if I do with terminal code it works as follows:
chmod +x /path/to/ipynbStart.sh
./ipynbStart.sh
I do the first approach with .bat file in windows and it works fine. I tried a lot But I could not find a solution. Thanks in advance.
It was not that difficult. I just create a new sh file (jupyter-start.sh) with the following command in the project directory I wanted:
#!/bin/bash
clear
sh -c /home/datapsycho/miniconda3/bin/jupyter-notebook
In the third line it's the path to the jupyter-notebook in my system.
Then run the chmod +x jupyter-start.sh to make it executable. Now I can place that file to all my project folders where I need to start jupyter notebook and it will always start in the specific project directory I want.
Now every time I just can execute that program to start jupyter notebook with out writing any thing in the shell.

Actions on Google - Mac gactions won't run

I am trying to set up the Actions sdk as described here:
https://developers.google.com/actions/sdk
I downloaded gactions for a Mac 64-bit machine. If I try to open the file, it opens as text. When I am in the folder containing gactions, I try to run gactions init and get the response:
-bash: gactions: command not found
Any thoughts?
Try this:
Download Google gactions cli from gaction CLI
On Mac and Linux, to make the binary executable run from terminal:
$ cd folder_with_gactions
$ chmod +x gactions
Execute gactions
$ cd folder_with_gactions
$ ./gactions init
Also, you may find this tutorial interesting if you are trying to create an action in Google Home : How to create a custom private Google Home Action with API.AI and Google App Engine. In STEP 8 you can find an example of gactions.
If you have already setup google-cloud-sdk correctly, then you can drop the gactions file into the google-cloud-sdk/bin folder. Alternatively, you can add a path to bash directly to the folder you have gactions.
To add the gactions command CLI location to the System Paths:
Use “Go to the Folder” option of Finder, to search “~/.bash_profile”
Open the File “~/.bash_profile”
 in edit mode and add the following command, at the top the file, Save and Close.
export PATH="$PATH:$HOME/gactionsCLI"
Note: Above path refers to the folder which contains the executable
file “Unix Executable”
Restart the Terminal and try the commands
Download gactions
copy downloaded gactions and put into a local Project folder
and then go to your project directory cd "project directory"
run following commands :
$ chmod +x gactions
$ ./gactions init
it will create action.json into your folder
Ensure you run chmod +x gactions to make the binary executable
Copy the binary executable into the project directory
Run ./gactions init from the terminal/command line

Eclipse, error: Couldn't write file "...." (permission denied)

I have a maven project on eclipse linked with a git repository. When I try to save files, eclipse tells me that it couldn't save the file because the permission is denied. I noticed that it happened after I remove some class from my project.
This is because according to your system, you are not the owner of the particular directory. If you are using ubuntu here is what you can do:
Login as root user to do this, in terminal enter command
"sudo su"
provide your password.
Then navigate till the directory and enter command
"chown -v user_name -R folder_name/"
This worked for me hope will do for you.