Docker Compose Install Postgres
Installing Postgres using Docker Compose1234567891011121314151617version: "3.9"services: postgres: image: postgres:13.22-trixie container_name: postgres_13 restart: always environment: POSTGRES_USER: root POSTGRES_PASSWORD: root POSTGRES_DB: mydb ports: - "5432:5432" volumes: - ./data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U root"]
Docker Compose Install Mysql
Installing Mysql using Docker Compose12345678910111213141516version: '3'services: mysql: image: mysql:8.0.18 container_name: mysql8 environment: - MYSQL_ROOT_PASSWORD=root# - TZ=Asia/Shanghai volumes: - ./log:/var/log/mysql - ./data:/var/lib/mysql - ./conf/conf.d:/etc/mysql/conf.d # - /etc/localtime:/etc/localtime:ro ports: - 3306:3306 restart: always
Docker Compose Install MongoDB
Installing MongoDB using Docker Compose1234567891011121314151617181920212223242526version: "3.8"services: mongodb: image: mongo container_name: mongodb ports: - 27017:27017 volumes: - ./database:/data/db environment: - MONGO_INITDB_ROOT_USERNAME=admin - MONGO_INITDB_ROOT_PASSWORD=adminpwd # mongo-express: # image: mongo-express # container_name: mongo-express # restart: always # ports: # - 8081:8081 # environment: # - ME_...
docker install DVWA
Installing DVWA using DockerInstall the Damn Vulnerable Web Application (via a Docker container) quite easily, as it will take care of all the dependencies required (e.g. mySQL). Open a terminal within your Ubuntu instance. Install DVWA with the following command: sudo docker run —restart always -p 80:80 vulnerables/web-dvwa DVWA should now be installed and running. To access it, open up Firefox and browse to your localhost address. In other words, in the URL toolbar (where you type in URLs)...
docker install supabase
InstructionIt is recommended to use Linux, as issues may occur when connecting to the pool on Windows systems. docker install supabase12345678910111213141516171819202122232425# Get the codegit clone --depth 1 https://github.com/supabase/supabase# Make your new supabase project directorymkdir supabase-project# Tree should look like this# .# ├── supabase# └── supabase-project# Copy the compose files over to your projectcp -rf supabase/docker/* supabase-project# Copy the fake env varscp supabase...
Fix "Unable to locate package docker-compose-plugin" on Ubuntu
Install Docker Compose on UbuntuWhen trying to install Docker Compose with the command: 1sudo apt install docker-compose-plugin you might encounter the following error:1234Reading package lists... DoneBuilding dependency tree... DoneReading state information... DoneE: Unable to locate package docker-compose-pluginThis happens because the default Ubuntu repositories don’t include the latest Docker packages. To fix it, you need to enable the official Docker repository first. Solution Remove old...
Installing Docker in Ubuntu
Installing Docker in UbuntuDocker (https://www.docker.com/) is an open-source technology that allows for applications to be packaged into ‘containers’ which include any required libraries and other dependencies. This makes it very easy to deploy applications (especially for large enterprises who need to setup their workstations), and you can run more applications on the same amount of hardware (as containers use less resources than virtual machines hosting the applications), among other benef...
Leetcode - 18. 4Sum
DescriptionGiven an array nums of n integers, return an array of all the unique quadruplets [nums[a], nums[b], nums[c], nums[d]] such that: 0 <= a, b, c, d < n a, b, c, and d are distinct. nums[a] + nums[b] + nums[c] + nums[d] == target You may return the answer in any order. 12345678Example 1:Input: nums = [1,0,-1,0,-2,2], target = 0Output: [[-2,-1,1,2],[-2,0,0,2],[-1,0,0,1]]Example 2:Input: nums = [2,2,2,2,2], target = 8Output: [[2,2,2,2]] 12345Constraints:1 <= nums.length <= ...
Leetcode - 17. Letter Combinations of a Phone Number
DescriptionGiven a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. Return the answer in any order. A mapping of digits to letters (just like on the telephone buttons) is given below. Note that 1 does not map to any letters. 1234Example 1:Input: digits = "23"Output: ["ad","ae","af","bd","be","bf","cd","ce","cf"] 1234Example 2:...
Leetcode - 16. 3Sum Closest
DescriptionGiven an integer array nums of length n and an integer target, find three integers in nums such that the sum is closest to target. Return the sum of the three integers. You may assume that each input would have exactly one solution. 12345Example 1:Input: nums = [-1,2,1,-4], target = 1Output: 2Explanation: The sum that is closest to the target is 2. (-1 + 2 + 1 = 2). 12345Example 2:Input: nums = [0,0,0], target = 1Output: 0Explanation: The sum that is closest to the target is 0. (0 ...







