Tag:Port mapping

  • Cenos7 + git + docker + Jenkins + Python continuous integration: Chapter 1 docker

    Time:2022-4-12

    1、 Docker installation 1. Check docker installation history: Yum list installed | grep docke If docker exists, use docker directly      2. Install dependent packages: Yum install – y Yum utils device mapper persistent data lvm2       3. Configure Yum image source and add domestic image source: Yum config Manager — add repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo Storage […]

  • Incomplete exploration of port mapping in docker networks

    Time:2022-1-18

    This article is really shared within the team, as follows: Today’s sharing does not include the story background, the development and application of docker The sharing comes from the question ‘why can’t I access the port I have specified through expose in dockerfile?’ In depth exploration. In fact, today’s sharing can also be regarded as […]

  • Quickly deploy golang applications using docker

    Time:2021-12-30

    Article directory: target image Golang Alpine Port mapping Occupy local port 8081 remarks Dockerfile Software used in this article: Mac 12.0 beta (MacOS Monterey), processor: M1 Portainer.io:2.5.1 Docker:20.10.6 target Rapid deployment of golang applications Building dockerfile Golang website Alpine website Goproxy URL FROM golang as build #Configure module agent ENV GOPROXY=https://goproxy.cn,direct ADD . /www #Enter […]

  • 4.7 deployment demonstration of multi container complex applications

    Time:2021-11-7

    Use Flash + redis to build a web project that implements the counter function Create a redis container docker run -d –name redis redis Create a flask container The dockerfile file is as follows FROM hub.c.163.com/library/python LABEL maintainer=”[email protected]” COPY . /app WORKDIR /app RUN pip install flask redis EXPOSE 5000 CMD [“python”,”app.py”] The contents of […]

  • Docker sets up redis master-slave replication

    Time:2021-11-5

    First, search redis from dockerhubThen pull the docker locallydocker pull redis, after synchronizing the image.We need to perform port mapping and file mapping on the container so that redis can read the local redis.conf file. For the price of redis.conf, you can go to the official website of redis to download a redis, and then […]

  • fucking great! An artifact that enables secure, automated cross network access

    Time:2021-10-5

    Autossh is a software for safely automating SSH login.! For example, we have deployed many services on the host2 machine, but for some reason, we cannot directly SSH access the corresponding port of the service on the server, but the host3 server can access both the host2 server and our host1 server. This is because […]

  • 9.3 k8s minimum dispatching unit pod

    Time:2021-10-5

    Relationship with container A pod can contain one or more containers Pod management Create a new pod_ Nginx.yml file apiVersion: v1 kind: Pod metadata: name: nginx labels: app: nginx spec: containers: – name: nginx image: nginx ports: – containerPort: 80 establish #If the installation fails or hangs, you can view the error message through kubectl […]

  • Docker common commands

    Time:2021-9-23

    1. View all containers docker ps -a 2. Enter a container docker exec -it nginx bash 3. Stop a container docker stop name 4. Start a container docker restart name 5. Docker run – run (create) a container docker run -d -p 0.0.0.0:18080:8080 –name nginx1 nginx -d: Let the container run in the background -P: […]

  • Install and deploy redis using docker (configuration file startup)

    Time:2021-8-12

    1、 Install docker My computer is Mac, Download docker DMG file directly 2、 Get redis image docker search redis docker pull redis:latest docker images 3、 Create container 1. Create a new redis directory to store redis.conf mkdir onlineinternship/redis cd redis 2. Download the official redis configuration file Redis profile 3. Modify configuration item Bind 127.0.0.1 […]

  • Running the nginx container using docker

    Time:2021-8-6

    #Search nginx image docker search nginx #Pull nginx image docker pull nginx #View all mirrors docker images #Run the nginx container, – d run the container in the background and print out the container ID, – P map port 80 of the container to port 3344 of the host docker run -d -p 3344:80 –name […]

  • Using docker to run elasticsearch container

    Time:2021-7-13

    #Search elasticsearch image docker search elasticsearch #Pull elasticsearch image docker pull elasticsearch #View all images docker images #Run elasticsearch container, – d run container in background and print out container ID, – P map 9200 port of container to 9200 port of host docker run -d –name es \ -p 9200:9200 -p 9300:9300 \ -e […]

  • Debian 10 open SSH

    Time:2021-6-30

    When the CD is installed, no additional components are installed.To log in through TTY terminal, configure SSH first. 1. Solve the problem of vim backspace key failure Open / etc / VIM / vimrc.tiny, input and save set nocompatible set backspace=2 2. Modify Debian installation source to domestic image Open / etc / apt / […]