I'm trying to run a visual studio server and create a dockerfile. If you want to reproduce the script clone https://github.com/alessandriLuca/4Stackoverflow .
script.sh will build the docker container and run it sharing the port. The problem is that apparently i cant reach the port 8080 even if i exposed it. I solved on ubuntu with --network host but this option is not accessible for OsX or Windows.
Here is the last part of the dockerfile, that is related to visualStudio installation
COPY visualStudio /visualStudio
RUN cd /visualStudio/ && 7za -y x "*.7z*"
RUN dpkg -i /visualStudio/visualStudio/*.deb
COPY config.yaml ~/.config/code-server/config.yaml
EXPOSE 8080
CMD ["code-server","--auth","none"]
As you can see i use a config.yaml but that one is also not working since when i run the code-server that file is overwritten so, the port still remain 8080.
Thank you for any help
EDIT
You can find all files, included config.yaml here https://github.com/alessandriLuca/4Stackoverflow/tree/main/merged2_visualStudio
EDIT
I kind of solved it! Practically as you said was hosting on 127.0.0.1 instead of 0.0.0.0, soo i changed manually in config.yaml and now is working. The only problem now is to add this configuration directly in the dockerfile since, when I run the server he overwrite the config.yaml that I created. Does someone have any idea about this part?
I am trying to build a nginx webserver to share files among team members.
In 'ubuntu 16.04', I am running following command:
root#automation00-new:/home/test# docker run -d -p 8081:80 -v /var/www/apj/:/usr/share/nginx/html --name test-nginx nginx:latest
As shown below docker is able to mount the files successfully.
root#automation00-new:/home/test# docker exec ec795af0f1f2 ls /usr/share/nginx/html
Builds
Logs_for_perf_Testing
json.txt
ravi
root#automation00-new:/home/test#
But when I try to access webserver using browser "http://1.1.1.1/8081" I am seeing '403 forbidden' error.
But if I try 'http://1.1.1.1/8081/json.txt', I am able to view the 'json.txt' contents on browser.
I want to browse all the directories and files inside.
Any idea on how to fix this issue please?
Please give us more context in terms of your nginx configuration.
Are you using the default nginx.conf or do you have done modifications?
The solution should be to add all relevant files to the nginx index
Details also here, you will need to modify your nginx.conf:
autoindex needs to be turned on for the location /
I am trying to get the Superset running on ubuntu server. I have referenced the steps from Superset page as below:
git clone https://github.com/apache/incubator-superset/
cd incubator-superset/contrib/docker
# prefix with SUPERSET_LOAD_EXAMPLES=yes to load examples:
docker-compose run --rm superset ./docker-init.sh
# you can run this command everytime you need to start superset now:
docker-compose up
I have fixed the initial issues around right version of docker-compose and postgress address bind issue on port 5432. So after fixing those my docker compose run command
docker-compose run --rm superset ./docker-init.sh
works fine and it asks me to set up a user name and password.
Finally to get the container running I run the final command
docker-compose up.
On my mac, it would run redis, postrgre container and then give me a localhost:8088 for me to get access to Superset UI with login info.
However on Ubuntu, when I run that, I first get this:
So looks it is running redis and postgres containers fine.
But then it is giving me Permission denied errors to create some mkdir directory.
Pls note I am running it as root user.
Also, my docker compose version is fine with 1.23.2 and my docker along with docker-compose is installed under
/usr/bin/docker and not /usr/local/bin/docker.
But I think that shouldn't be an issue.
Any help where it is going wrong and how can I fix it?
Thanks
Edit:
Ok I looked at the same issue mentioned on Github. And used a suggestion of using it only for Production and not development in docker-compose.yml file.
It seems to not throw the same error now when I do
docker-compose up.
However when I open localhost:8088 it does not connect to the UI.
try this:
mkdir ../../assets
chmod -R 777 ../../superset/assets/
as set in docker-compose.yml#L64, it is using ../../superset as volume when in develop. However the container does not have any permission in the host so the solution is to make a directory by yourself and grant the necessary permissions on to it.
I currently have InfluxDB feeding dashboards in Grafana. I will eventually be deploying this stack on a server.
However, the default port for Grafana is 80. I must change this port, but I don't know how. Can anyone help out?
Thanks.
Not only change in /etc/grafana/grafana.ini you have to change in
/usr/share/grafana/conf/defaults.ini and /usr/share/grafana/conf/sample.ini files. Just search 3000 port(which is default port for grafana) in these three files and replace it with your preferred port.
Here's the easiest way I found.
docker run -d \
-p 2345:2345 \
--name grafana \
-e "GF_SERVER_HTTP_PORT=2345" \
grafana/grafana
See the documentation here.
https://grafana.com/docs/grafana/latest/installation/docker/#configuration
Since Grafana 2.0:
Grafana now ships with its own backend server
You can edit /etc/grafana/grafana.ini (usual location) and change the running port:
[server]
http_port=1234
Source:
http://docs.grafana.org/installation/configuration/
If you are using Linux, you can change the default port by changing the port from /etc/grafana/grafana.ini. There is no separate custom.ini for Linux. For Windows, MacOS or any other platform, check the official documentation.
For opening grafana.ini, you would need sudo privileges. For changing the port please follow the steps below.
Execute sudo gedit /etc/grafana/grafana.ini in a new Terminal window.
Search for 3000 in the `.ini. file and you will find a line similar to the one shown below.
# The http port to use
;http_port = 3000
Remove the semicolon (;) and change the port to the port that you wish to run the grafana server on.
Save the file and close gedit.
You will need to restart the Grafana server for the changes to take place. Run sudo systemctl restart grafana-server.
The grafana server should be started on the port that you provided. Please note that you will have to write systemctl or service depending upon your init system. To determine your init system, run ps --no-headers -o comm 1.
Source
For those using Docker:
Create a grafana.ini:
[server]
http_port = 1234
Update your Dockerfile:
FROM grafana/grafana
EXPOSE 1234
ADD grafana.ini /etc/grafana
Build and run the container:
docker build grafana
docker run \
-d \
-p 1234:1234 \
--name grafana \
grafana/grafana
The EXPOSE is technically optional but is good practice for documentation.
For Linux, I grab the setup file form here
https://grafana.com/grafana/download?platform=linux
Then install it!
You only need to change this one /usr/share/grafana/conf/defaults.ini:
Replace:
http_port = 3000
With
http_port = YourPortYouWant
Then restart your app:
sudo service grafana-server stop
sudo service grafana-server start
To verify you should run:
sudo service grafana-server status
Then you can see the app lives in your desired port:
Open up localhost:yourport to see the result.
I think the document from Grafana should be updated.
On windows,
Change port from 3000 to 3001 in "C:\Program Files\GrafanaLabs\grafana\conf\defaults.ini"
Restart Grafana service from windows services
I know its old thread but for me in Mac i had to make changes at 2 places.
I installed through Brew
/usr/local/etc/grafana/grafana.ini
/usr/local/Cellar/grafana/8.1.5/share/grafana/conf/defaults.ini
Grafana just runs behind a standard web server, like apache. If you are using apache, just update your virtual hosts file to use whatever port you want, and restart apache. Grafana will then be on the new port.
For Windows 10 and Grafana v7.1.1, the following steps made the Grafana to be served in different port:
Navigate to the Grafana "conf" folder location like "C:\Program Files\GrafanaLabs\grafana\conf"
Copy the file "sample.ini" in the same location
Rename the copied sample.ini to "custom.ini"
Edit the "custom.ini" by opening in any editor.The editor must be running as Administrator.
Uncomment the ";http_port = 3000" line by removing the semicolon(;). Note: Semicolon(;) is used to comment out lines in .ini files
Change the port "3000" to whatever port is required. Make sure the new port should be admin rights. I changed to port "3001".
Save the file.
Restart the Windows machine.
The Grafana url is now hosted in "http://localhost:3001/?orgId=1"
You have to remove (;), like this:
http_port = 3900
I'm very new to system administration and have no idea how init.d works. So maybe I'm doing something wrong here.
I'm trying to start unicorn on boot, but somehow it just fails to start everytime. I'm able to manually do a start/stop/restart by simply service app_name start. Can't seem to understand why unicorn doesn't start at boot if manual starting stopping of service works. Some user permission issue maybe ??
My unicorn init script and the unicorn config files are available here https://gist.github.com/1956543
I'm setting up a development environment on Ubuntu 11.1 running inside a VM.
UPDATE - Could it be possible because of the VM ? I'm currently sharing the entire codebase (folder) with the VM, which also happens to contain the unicorn config needed to start unicorn.
Any help would be greatly appreciated !
Thanks
To get Unicorn to run when your system boots, you need to associate the init.d script with the default set of "runlevels", which are the modes that Ubuntu enters as it boots.
There are several different runlevels, but you probably just want the default set. To install Unicorn here, run:
sudo update-rc.d <your service name> defaults
For more information, check out the update-rc.d man page.
You can configure a cron job to start the unicorn server on reboot
crontab -e
and add
#reboot /bin/bash -l -c 'service unicorn_<your service name> start >> /<path to log file>/cron.log 2>&1'