Alpine Devel - ์ํ์ธ ๊ฐ๋ฐ ํ๊ฒฝ
Setup build-base ์ค์น binutils file gcc g++ make libc-dev fortify-headers patch # Install build-base doas apk add build-base # Check gcc --version make --version
Setup build-base ์ค์น binutils file gcc g++ make libc-dev fortify-headers patch # Install build-base doas apk add build-base # Check gcc --version make --version
Intro ํ๋ก๊ทธ๋๋ฐ ํ๊ฒฝ์์ ๊ฐ ์ธ์ด๋ณ ์ฃผ์์ฒ๋ฆฌ๋ฅผ ์ฝ๊ฒ ์ถ๊ฐ ์ ๊ฑฐ ํ ์ ์๋ ํ๋ฌ๊ทธ์ธ ๊ด๋ จ ํ๋ฌ๊ทธ์ธ ์ค์ ๊ฐ์ฅ ์ธ๊ธฐ๊ฐ ๋ง๊ณ ์ฌ์ฉ์ด ํธ๋ฆฌํ๋ค. Features Supports treesitter. Supports commentstring. Read :h comment.commentstring Supports line (//) and block (/* */) comments Dot (.) repeat support for gcc, gbc and friends Count support for [count]gcc and [count]gbc Left-right (gcw gc$) and Up-Down (gc2j gc4k) motions Use with text-objects (gci{ gbat) Supports pre and post hooks Ignore certain lines, powered by Lua regex Install With packer.nvim use { 'numToStr/Comment.nvim', config = function() require('Comment').setup() end } Manual Install $ cd ~/.local/share/nvim/site $ git clone https://github.com/numToStr/Comment.nvim $ cp Comment.nvim/plugin/Comment.lua plugin/ $ cp -r Comment.nvim/lua/Comment lua/ $ vi ~/.config/nvim/init.lua ... lua require('Comment').setup() :so % REFERNCE Comment.nvim Github: https://github.com/numToStr/Comment.nvim
INTRO Requirement: Docker Hub registration Requirement: Docker install on local login and create and push images to docker hub Docker Login $ docker login Username: neosolaris Password: xxxxxxx Login Succeeded Create Sample image create project dir and files $ mkdir myproject && cd myproject $ vim server.js $ vim Dockerfile server.js var http = require('http'); var handleRequest = function(request, response) { console.log('Received request for URL: ' + request.url); response.writeHead(200); response.end('Hello World!'); }; var www = http.createServer(handleRequest); www.listen(8080); Dockerfile FROM node:6.9.2 EXPOSE 8080 COPY server.js . CMD node server.js ์ด๋ฏธ์ง ๋น๋ ๋ช ๋ น ์คํ ํ ๋ธ๋ผ์ฐ์ ์์ http://localhost:8080 ํ์ธ $ docker build -t neosolaris/hello-nodejs:v1 . #์ฌ์ฉ์๋ช /์ ์ฅ์๋ช :ํ๊ทธ๋ช $ docker images # ๋น๋์ด๋ฏธ์ง ํ์ธ $ docker run -d -p 8080:8080 -t neosolaris/hello-nodejs:v1 # ํ ์คํธ ์ปจํ ์ด๋ ์ข ๋ฃ $ docker ps # ํ์ฌ ์ปจํ ์ด๋๋ค ํ์ธ $ docker stop <Container ID> # ํด๋น ์ปจํ ์ด๋ ์ข ๋ฃ ์ด๋ฏธ์ง ์ ๋ก๋ $ docker push neosolaris/hello-nodejs:v1 #์ฌ์ฉ์๋ช /์ ์ฅ์๋ช :ํ๊ทธ๋ช Image ์ ๋ก๋๋ ๋์ปคํ๋ธ์์ ํ์ธ: https://hub.docker.com/u/neosolaris Links https://snowdeer.github.io/docker/2018/02/14/docker-push-image-to-docker-hub/
Intro docker๋ ์์ฉํ๋ก๊ทธ๋จ ๊ฐ๋ฐ์ ์ํ ์ํํธ์จ์ด ํ๋ซํผ์ด๋ค. Linux ๊ธฐ๋ฐ์์ ๋ ๋ฆฝ๋ ์ปจํ ์ด๋(ํ๋์ ํ๋ก์ธ์ค) ํํ๋ก ๋์ํ๋ค. go ์ธ์ด๋ก ๊ฐ๋ฐ๋์๋ค. ๊ฐ์OS์๋ ๋ค๋ฅด๊ฒ ๊ฐ๋ณ๊ณ ๋น ๋ฅด๋ค. ๋น๋๋ ์ด๋ฏธ์ง๋ฅผ ์ธ์ ์ด๋์์๋ docker๋ฅผ ํตํด ๋ฌธ์ ์์ด ์คํํ ์ ์๋ค. ์์ ๋ง์ ๊ฐ๋ฐํ๊ฒฝ์ ์ด๋ฏธ์ง๋ก ๊ตฌ์ถํด ๋์ผ๋ฉด ๊ฐ๋ฐ ์ปดํจํฐ๊ฐ ๋ฌ๋ผ์ ธ๋ ๋์ผํ ํ๊ฒฝ์์ ๊ฐ๋ฐํ ์ ์๋ค. ์คํํ๊ฒฝ์ ์ด๋ฏธ์ง๋ก ๋ง๋ค์ด ๋์ผ๋ฉด ์ฌ์ฉ์๊ฐ ๋์ผํ ํ๊ฒฝ์์ ๋ฌธ์ ์์ด ์คํํ ์ ์๋ค. Docker ์ค์น ๋ฐ ๊ธฐ๋ณธ ์ฌ์ฉ๋ฒ docker install - Docker ์ค์น docker setup - Docker ์ค์ docker build - Dockerfile ์์ฑ dockerhub - Docker Hub์ ํ์ ๊ฐ์ docker example - Docker Example: ์ฌ์ฉ๋ก Docker Tips docker run cmd entrypoint - Docker run, cmd, entrypoint ์ฐจ์ด docker images remove - Docker Image ์ ๊ฑฐ Docker ์์ฉ docker busybox - ๋์ปค busybox ํ์ฉ docker windows - ์๋์ฐ์ฆ์์ ๋์ปค ์ค์น ๋ฐ ์ฌ์ฉ Links https://hub.docker.com/ https://www.sobyte.net/post/2022-04/docker-copy/ https://docs.docker.com/engine/reference/builder/
Install luarocks ๋ฅผ ์ด์ฉํ์ง ์๊ณ ํ์ํ ๋ชจ๋๋ง ์ค์นํด์ ์ฌ์ฉํ๊ณ ์ ํ ๋ $ sudo apt update && sudo apt upgrade $ apt install git build-essensial #git, gcc, make ํ๊ฒฝ ํ์ $ apt install lua5.1.0 liblua5.1.0 #lua module ์ปดํ์ผ์ liblua ํ์ $ git clone https://github.com/lunarmodules/luafilesystem.git #luafilesystem ์์ค ๋ณต์ฌ $ cd luafilesystem $ make # gcc, make, liblua5.1.x ํ์ ์กฐ๊ฑด $ cp src/lfs.so your_devel_directory/ $ cd your_devel_directory/ $ vim myprogram.lua require'lfs' ... LuaStatic ์ค์น ๋ฐฉ๋ฒ1: luastatic.lua ์์ ์ ์ปดํ์ผํด์ ๋ฐ์ด๋๋ฆฌ๋ก ์ฌ์ฉ $ git clone https://github.com/ers35/luastatic.git $ cd luastatic/ $ uastatic.lua luastatic.lua /usr/lib/arm-linux-gnueabihf/liblua5.1.a -I/usr/include/lua5.1/ $ ./luastatic # ๋ฐ์ด๋๋ฆฌ ์คํ ๋ฐ ๋ฒ์ ํ์ธ ๋ฐฉ๋ฒ2: luastatic.lua๋ฅผ ๊ทธ๋๋ก ์ฌ์ฉ $ git clone https://github.com/ers35/luastatic.git $ cd luastatic/ $ ./luastatic.lua # ์คํฌ๋ฆฝํธ ์คํ ๋ฐ ๋ฒ์ ํ์ธ ๋ชจ๋๊ณผ ํฉ์ณ์ ๋ฐ์ด๋๋ฆฌ๋ก ์ปดํ์ผ ํ๊ธฐ luastatic.lua ์์ ์ ์์กด์ฑ์ด ์์ผ๋ฏ๋ก ~/bin ๋ฑ์ ์ฎ๊ธด ํ ์ฌ์ฉํด๋ ๋๋ค. myprogram.lua๊ฐ ๊ฐ์ ํด๋์ ์๋ ๋ชจ๋์ ์ฌ์ฉํ๋ค๋ฉด ์๋์ผ๋ก ํฌํจํด์ ์ปดํ์ผ๋๋ค. $ cp luastatic.lua ~/bin $ luastatic.lua myprogram.lua /usr/lib/arm-linux-gnueabihf/liblua5.1.a -I/usr/include/lua5.1/ ๊ณ ๋ ค ์ฌํญ ์์ ์์ ์ฒ๋ผ ์ปดํ์ผ ํ๊ฒฝ์ ๋ง๋ค๊ณ ๋ชจ๋์ ๋ง๋ค์ด requireํด์ ์ฌ์ฉ. ์ฌ๋ฌ ๋ชจ๋๊ณผ main.lua๊ฐ ์์ ๊ฒฝ์ฐ ์ด๋ฅผ ํ๋๋ก ํฉ์ณ ๋ฐ์ด๋๋ฆฌ๋ก ๋ง๋ ๋ค. ๋๋ ํ์ผ์ ์ค์นํ๊ณ ์คํํ๊ฒฝ์ ๋ง๋ค์ด ์ค๋ค. ์ด์ ๋ํด์๋ ๋์ค์ ์ถ๊ฐํ ์์ .