These are recommended steps for setting up your WSL
This will allow users to set the owner and group of files using chmod/chown and modify read/write/execute permissions in WSL.
- unmount drvfs
| # | |
| # Virtual Hosts | |
| # | |
| # If you want to maintain multiple domains/hostnames on your | |
| # machine you can setup VirtualHost containers for them. Most configurations | |
| # use only name-based virtual hosts so the server doesn't need to worry about | |
| # IP addresses. This is indicated by the asterisks in the directives below. | |
| # | |
| # Please see the documentation at | |
| # <URL:http://httpd.apache.org/docs/2.2/vhosts/> |
Udate /etc/hosts or c:\windows\system32\drivers\etc\hosts file so that the new servername is mapped to 127.0.0.1
Apache config file changes document root
DocumentRoot "/Users/hoan/www"
<Directory "/Users/hoan/www">
#
| # https://hub.docker.com/repository/docker/aleleba/code-server | |
| FROM codercom/code-server:3.12.0 | |
| RUN sudo apt-get update | |
| #Instalando Node.js | |
| RUN curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash - | |
| RUN sudo apt -y install nodejs | |
| #Terminando de Instalar Node.js |
| const moment = require("moment"); | |
| const sqlite3 = require("sqlite3").verbose(); | |
| type SecurityTxt = { | |
| // attributes | |
| acknowledgments: Array<string>; // optional | |
| canonical: Array<string>; // optional | |
| contact: Array<string>; // required | |
| encryption: Array<string>; // optional | |
| expires: string; // required, max once |
| [user] | |
| name = project operations | |
| email = [email protected] | |
| [core] | |
| editor = \"C:\\Program Files\\Microsoft VS Code\\Code.exe\" \"-n\" | |
| whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol,space-before-tab | |
| tabwidth=4 | |
| excludesfile = ~/.gitignore-global | |
| symlinks = false |
See this issue.
Docker best practise to Control and configure Docker with systemd.
Create daemon.json file in /etc/docker:
{"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| boxes = [ | |
| { | |
| :name => "server1", | |
| :eth1 => "192.168.205.10", | |
| :mem => "1024", | |
| :cpu => "1" |
| version: '3' | |
| volumes: | |
| local-dbt-env-shell-history: # This basically let's docker auto-manage this volume. | |
| services: | |
| local-dbt-env: | |
| profiles: | |
| - development | |
| platform: linux/amd64 # We force the platform for consistency. |
| import subprocess | |
| def get_docker_containers(): | |
| try: | |
| # Run the docker ps command with the specified format | |
| result = subprocess.run(['docker', 'ps', '--no-trunc', '--format', '{{.ID}}|{{.Image}}|{{.Command}}|{{.RunningFor}}|{{.Status}}|{{.Ports}}|{{.Names}}'], | |
| stdout=subprocess.PIPE, text=True, check=True) | |
| output = result.stdout | |
| except subprocess.CalledProcessError as e: | |
| print(f"Error executing command: {e}") |