-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
添加docker支持 #54
Comments
Thanks. 不过有一些建议可以作为参考:
|
@heiher 另外不知是否有构建 Docker 镜像的规划?如果有我可以帮忙提个 PR。 |
更新 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"] 感觉有些常用的命令也得加上去 |
如果能提个PR就太好了~ 有没有可能直接根据arch下载发布页由github action构建出来的二进制?那样会不会依赖简单一些 |
不编译,直接下载最新Releases的对应架构文件到alpine镜像就行吧,做好启动脚本和对应环境变量就ok,这样体积应该非常小 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Dockerfile:
构建镜像
docker-compose.yml
如果用python脚本的话,需要exec到容器内,再apt update && apt install python,其他的类似
The text was updated successfully, but these errors were encountered: