Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How docker deploys code-server

2025-01-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly introduces how to deploy code-server in docker, which is very detailed and has certain reference value. Friends who are interested must finish it!

Pull the image # docker pull codercom/code-server# docker imagesREPOSITORY TAG IMAGE ID CREATED SIZEcodercom/code-server latest f3ac734fcec8 12 days ago 802MB to create a mount directory # CODE=/home/docker/code# mkdir $CODE & & cd $CODE configuration file

Method 1: export from the container

Start a container:-u means to run using the root user

# docker run-d-u root-p 8088 CODE:/home/code codercom/code-server# docker psCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES97707c93cb41 codercom/code-server 8080-- name code-server-v $CODE:/home/code codercom/code-server# docker psCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES97707c93cb41 codercom/code-server "/ usr/bin/entrypoint …" 3 hours ago Up 3 hours 0.0.0.0 8080/tcp 8088-> 8080/tcp,:: 8088-> 8080/tcp code-server

Pull out the configuration file:

# docker cp code-server:/root/.config/code-server/config.yaml $CODE/# cat $CODE/config.yamlbind-addr: 127.0.0.1:8080auth: passwordpassword: 59bd4df2841fbc77d67f674fcert: false

Change the password: 123456

Method 2: directly create a new configuration file [

# vim $CODE/config.yamlbind-addr: 127.0.0.1:8080auth: passwordpassword: 123456cert: false launch Service # docker stop code-server & & docker rm code-server# docker run-d-u root\-p 8088 CODE:/home/code 8080\-- name code-server\-v $CODE/config.yaml:/root/.config/code-server/config.yaml\-v $CODE:/home/code\ codercom/code-server

Access, for example, http://192.168.0.206:8088/

These are all the contents of the article "how docker deploys code-server". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report