Solved: Docker's 'invalid reference format' Error - Why You Shouldn't Use a URL for Your Image
Content
## The Problem
When you try to run a Docker container using an image name copied directly from a web URL, you might encounter a very common error: `docker: invalid reference format`. This can be confusing for beginners, as URLs copied from browsers often include the `https://` protocol.
For instance, executing the following command will fail:
```bash
# Incorrect Command
[root@VM-4-11-centos ~]# docker run -d --name ee-lib00-reset \
> -e API_KEY=123 \
> -e TARGET_PLANS=FREE,PLUS \
> -v /path/wiki.lib00/data:/app/data \
> -v /path/wiki.lib00/logs:/app/logs \
> https://ghcr.io/vulpecula-studio/88code_reset:latest -mode=run
docker: invalid reference format.
See 'docker run --help'.
```
---
## Root Cause Analysis
The core of the issue is that the **Docker image reference format does not support URL protocol prefixes**.
The standardized naming convention for a Docker image is:
`[<registry-hostname>/][<project-or-username>/]<image-name>[:<tag>]`
Let's break it down:
* **`registry-hostname` (Optional):** The address of the container registry, such as `docker.io` (the default), `ghcr.io`, `gcr.io`, or your private registry.
* **`project-or-username` (Optional):** The project or username used to organize images within the registry.
* **`image-name` (Required):** The name of the image.
* **`tag` (Optional):** The version tag of the image, like `latest` or `1.2.0`. If omitted, it defaults to `latest`.
In the incorrect command above, the image reference `https://ghcr.io/vulpecula-studio/88code_reset:latest` includes `https://`, which violates the format Docker expects. The Docker client automatically handles secure communication (usually HTTPS) with the registry behind the scenes, so we don't need to specify the protocol in the command.
---
## The Solution
The solution is straightforward: **remove the `https://` prefix from the image name**.
Modify the command as shown below to run the container successfully.
```bash
# Correct Command
docker run -d --name ee-lib00-reset \
-e API_KEY=123 \
-e TARGET_PLANS=FREE,PLUS \
-v /path/wiki.lib00/data:/app/data \
-v /path/wiki.lib00/logs:/app/logs \
ghcr.io/vulpecula-studio/88code_reset:latest -mode=run
```
---
## Conclusion
The `docker: invalid reference format` error is a fundamental but common hiccup. Remember, when referencing a Docker image, never include `http://` or `https://`. Just provide the path starting from the registry hostname. We hope this guide from the **DP** team at **wiki.lib00.com** helps you quickly identify and resolve this issue.
Related Contents
Resolving PHP "could not find driver" Error: Ultimate Guide to Missing PDO Database Drivers
Duration: 00:00 | DP | 2026-07-04 08:03:00Resolving Nginx Permission Denied (13) Errors for WebP Images Generated by PHP Imagick
Duration: 00:00 | DP | 2026-07-05 21:17:00How to Fix Mac mini Not Receiving SMS Messages and iCloud Sync Stuck
Duration: 00:00 | DP | 2026-07-06 22:07:00Complete Guide to Installing and Configuring Git Server on Synology NAS: Basic to Advanced
Duration: 00:00 | DP | 2026-07-16 20:39:02Why Do .smbdelete Hidden Files Appear After Deleting on Mac SMB Shares? Causes & Ultimate Solutions
Duration: 00:00 | DP | 2026-06-27 19:10:00Complete Guide to Setting Docker Container Timezone to UTC+8 (Asia/Shanghai)
Duration: 00:00 | DP | 2026-06-30 20:43:30Ultimate Guide to Fixing Nginx [warn] conflicting server name Warning
Duration: 00:00 | DP | 2026-07-21 09:02:28Fixing 'Unable to locate package openjdk-17-jdk' in PHP 8 Docker (Debian Trixie)
Duration: 00:00 | DP | 2026-07-25 09:23:18Docker Compose Advanced: Configuring Static IPs and Cross-Container SOCKS5 Proxies
Duration: 00:00 | DP | 2026-07-26 09:28:30Nginx Reverse Proxy Guide: Elegantly Routing Specific Subdirectories to Docker Containers
Duration: 00:00 | DP | 2026-07-26 21:31:06DevOps Practice: How to Safely Clear Logs of a Running Docker Container?
Duration: 00:00 | DP | 2026-07-27 09:33:42Ultimate Guide to Setting Up Proxies on CentOS: Global Configuration and Troubleshooting
Duration: 00:00 | DP | 2026-07-27 21:36:19Practical Guide: Translating Complex Docker Compose to Docker Run Commands
Duration: 00:00 | DP | 2026-07-29 09:44:07The Ultimate Guide to Docker Cron Logging: Host vs. Container Redirection - Are You Doing It Right?
Duration: 00:00 | DP | 2026-01-05 08:03:52Cron Job Failing? The Ultimate Guide to Fixing 'docker: command not found'
Duration: 00:00 | DP | 2026-08-01 09:59:44The Ultimate 'Connection Refused' Guide: A PHP PDO & Docker Debugging Saga of a Forgotten Port
Duration: 00:00 | DP | 2025-12-03 09:03:20Solving the MySQL Docker "Permission Denied" Error on Synology NAS: A Step-by-Step Guide
Duration: 00:00 | DP | 2025-12-03 21:19:10How Can a Docker Container Access the Mac Host? The Ultimate Guide to Connecting to Nginx
Duration: 00:00 | DP | 2025-12-08 23:57:30Recommended
The Ultimate Guide to the Linux `cp` Command: Avoiding Common Copying Pitfalls
00:00 | 116This article provides a deep dive into `cp`, one o...
PHP in Practice: How to Elegantly Handle MySQL and PostgreSQL in the Same Project
00:00 | 72In modern web development, it's increasingly commo...
Local Serena MCP Deployment: Supercharge Claude Code with Code-Awareness and Ensure Data Privacy
00:00 | 68This article provides a detailed, step-by-step gui...
Designing an Efficient Hash Identification Tool: A UI/UX Deep Dive from Wireframe to Best Practices
00:00 | 25This article provides a deep dive into the UI/UX d...