Comments (5)
Thanks. 不过有一些建议可以作为参考:
- 可以采用多阶段 (Multi-stage builds) 的方式构建,这样可以避免把整个 GCC 打进镜像里面,减少镜像体积;
- NATMap 目前还没有内置 iptables 转发(虽然我曾提过这个事),
NET_ADMIN
NET_RAW
这两个权限还暂时用不到。
from natmap.
@heiher 另外不知是否有构建 Docker 镜像的规划?如果有我可以帮忙提个 PR。
from natmap.
Thanks. 不过有一些建议可以作为参考:
1. 可以采用多阶段 (Multi-stage builds) 的方式构建,这样可以避免把整个 GCC 打进镜像里面,减少镜像体积; 2. NATMap 目前还没有内置 iptables 转发(虽然我曾提过这个事),`NET_ADMIN` `NET_RAW` 这两个权限还暂时用不到。
更新
FROM ubuntu:latest as builder
ENV LANG C.UTF-8
ENV LANGUAGE C.UTF-8
ENV LC_ALL C.UTF-8
RUN apt update \
&& apt upgrade -y \
&& apt install -y gcc git make curl \
&& git clone --recursive https://github.com/heiher/natmap.git \
&& cd natmap \
&& make \
&& cp ./bin/natmap /opt/natmap
FROM ubuntu:latest
RUN apt update \
&& apt upgrade -y \
&& apt install -y curl
COPY --from=builder /opt/natmap /opt/natmap
ENTRYPOINT ["/opt/natmap"]
感觉有些常用的命令也得加上去
from natmap.
@heiher 另外不知是否有构建 Docker 镜像的规划?如果有我可以帮忙提个 PR。
如果能提个PR就太好了~ 有没有可能直接根据arch下载发布页由github action构建出来的二进制?那样会不会依赖简单一些
from natmap.
不编译,直接下载最新Releases的对应架构文件到alpine镜像就行吧,做好启动脚本和对应环境变量就ok,这样体积应该非常小
from natmap.
Related Issues (20)
- UDP不能绑定服务端口 HOT 8
- IP4P版的FRPC无法正常解析IP4P地址 HOT 7
- 咨询一下启动以后有没有日志记录外网ip和端口? HOT 5
- Operation in progress什么鬼报错
- 不知道怎么给wiki提pr,大佬看下能不能更新下wiki上关于ssh的说明 HOT 2
- How about creating the docker image for NATMap?
- 问一个非常弱智的问题 HOT 5
- 在Android上执行时发生了错误 HOT 7
- Origin rule无法完成 HOT 4
- [Feature Request] iptables / nftables forwarding HOT 6
- How does stun - http work? HOT 1
- tcp和udp能否共存? HOT 7
- ssh断开连接问题 HOT 4
- 网络变动后故障 HOT 3
- ddns via cloudflare HOT 2
- 希望能增加参数,不要错误日志,或者把日志写入文件。 HOT 3
- notification scripts can be run manually, but natmap cannot
- 在开启clash的服务器上,无法打洞 HOT 1
- 请求在wireguard安卓客户端增加TXT记录解析 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from natmap.