本站面向开发者与科研用户,提供开源镜像的搜索和下载加速服务。
所有镜像均来源于原始开源仓库,本站不存储、不修改、不传播任何镜像内容。

docker-web-redirect Docker 镜像下载 - 轩辕镜像

docker-web-redirect 镜像详细信息和使用指南

docker-web-redirect 镜像标签列表和版本信息

docker-web-redirect 镜像拉取命令和加速下载

docker-web-redirect 镜像使用说明和配置指南

Docker 镜像加速服务 - 轩辕镜像平台

国内开发者首选的 Docker 镜像加速平台

极速拉取 Docker 镜像服务

相关 Docker 镜像推荐

热门 Docker 镜像下载

docker-web-redirect
arbarwings/docker-web-redirect

docker-web-redirect 镜像详细信息

docker-web-redirect 镜像标签列表

docker-web-redirect 镜像使用说明

docker-web-redirect 镜像拉取命令

Docker 镜像加速服务

轩辕镜像平台优势

镜像下载指南

相关 Docker 镜像推荐

Redirects all web traffic permanently to the given target domain/URL.
0 次下载activearbarwings镜像

docker-web-redirect 镜像详细说明

docker-web-redirect 使用指南

docker-web-redirect 配置说明

docker-web-redirect 官方文档

Docker-Web-Redirect

This Docker container listens (by default) on port 80 and redirects all web traffic permanently to the given target domain/URL.

_Hint: This repo was forked from [***]

Features

  • Nginx 1.25
  • Lightweight: Uses only ~2 MB RAM on Linux
  • Keeps the URL path and GET parameters
  • Permanent redirect (HTTP 301)
  • Image Size only ~25MB

Usage

Docker run

The target domain/URL is set by the REDIRECT_TARGET environment variable. The port may be changed to another port than 80 by the PORT environment variable. Possible redirect targets include domains (mydomain.com), paths (mydomain.com/my_page) or specific protocols ([***]).

Example (Listen on Port 80): $ docker run --rm -d -e REDIRECT_TARGET=mydomain.com -p 80:80 arbarwings/docker-web-redirect

Example (Listen on Port 8080): $ docker run --rm -d -e REDIRECT_TARGET=mydomain.com -e PORT=8080 -p 8080:8080 arbarwings/docker-web-redirect

Paths are retained

The URL path and GET parameters are retained. That means that a request to [***] will be redirected to [***] when REDIRECT_TARGET=mydomain.com is set.

Permanent redirects

Redirects are permanent (HTTP status code 301). That means browsers will cache the redirect and will go directly to the new site on further requests. Also search engines will recognize the new domain and change their URLs. This means this image is not suitable for temporary redirects e.g. for site maintenance.

Docker Compose

A sample docker-compose file that redirects any incomming domain to mydomain.com could look like this:

yaml
version: '3'
services:
  redirect:
    image: arbarwings/docker-web-redirect
    restart: always
    environment:
      - REDIRECT_TARGET=mydomain.com

Build the image yourself

$ docker build -t arbarwings/docker-web-redirect:latest .

Source code

[***]

用户好评

来自真实用户的反馈,见证轩辕镜像的优质服务

oldzhang的头像

oldzhang

运维工程师

Linux服务器

5

"Docker加速体验非常流畅,大镜像也能快速完成下载。"