8000 GitHub - imyuliz/chromegin: chromedp-golang 浏览器截图docker 微服务教程
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
forked from mojocn/chromegin

chromedp-golang 浏览器截图docker 微服务教程

Notifications You must be signed in to change notification settings

imyuliz/chromegin

 
 

Repository files navigation

imyulizzz/chromegin-ubuntu

基于Go、Chromedp 的截图服务

[√] 支持表情包显示; [TODO] 截图清晰度待提高

构建命令

docker build -t imyulizzz/chromegin-ubuntu:v0.0.6 . 

当前稳定的基础镜像为: imyulizzz/chromegin-ubuntu:v0.0.6

imyulizzz/chromegin-ubuntu:v0.0.6 Dockerfile

FROM ubuntu:22.04
# 更新软件包列表并安装中文字体、Google Chrome 和支持表情包的字体
RUN apt-get update && \
    apt-get install -y \
    wget \
    git \
    fonts-noto-cjk \
    fonts-wqy-zenhei \
    fonts-noto-color-emoji && \
    wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \
    apt-get install -y ./google-chrome-stable_current_amd64.deb && \
    google-chrome --version && \
    rm -rf *.deb

# 设置环境变量
ENV PATH="/usr/bin/google-chrome-stable:${PATH}"
ARG 
4FAA
GO_DIR=.
ARG BUILD_DIR=/gobin
WORKDIR $BUILD_DIR
COPY $GO_DIR/chromegin .
COPY $GO_DIR .
EXPOSE 6666
ENTRYPOINT  ["/gobin/chromegin"]

# 注: 使用 ubuntu:22.04 启动容器后, 手动执行了apt-get 相关命令,然后使用commit 构建的 imyulizzz/chromegin-ubuntu:v0.0.6 镜像
# 原因:安装 google-chrome-stable_current_amd64.deb 时,需要确认命令,这可能导致执行不成功。

About

chromedp-golang 浏览器截图docker 微服务教程

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 93.2%
  • Dockerfile 6.8%
0