ARTIFACTORY: Resolving Docker Image Push Failure Due to Special Characters in MySQL

Products
Frog_Artifactory
Content Type
Use_Case
AuthorFullName__c
Zhang Hailang
articleNumber
000006408
FirstPublishedDate
2025-04-21T06:25:11Z
lastModifiedDate
2025-04-20

ARTIFACTORY: Resolving Docker Image Push Failure Due to Special Characters in MySQL

Issue Description

Unable to upload some docker images, like the "soketi/soketi:1.6-16-debian" image, through the docker push command. The specific error message looks like:
Caused by: java.sql.SQLException: Incorrect string value: '\xF0\x9F\x93\xA3' for column 'prop_value' at row 1
Root Cause

This issue is typically caused by the character set configuration in MySQL not supporting certain characters, resulting in data write failures. 

To check the special characters in the docker image:

1. Pull the Image
First, pull the required Docker image:
docker pull quay.io/soketi/soketi:1.6-16-debian
2. Check for Special Characters in Image Labels
Next, check the labels of the pulled image, particularly the `org.opencontainers.image.description` field, to confirm the presence of special characters:
docker inspect quay.io/soketi/soketi:1.6-16-debian | grep org.opencontainers.image.description
User-added image 

Resolution 

The resolution to this issue is to rebuild the Image to remove the special characters.

If special characters are found in the labels, the next step is to rebuild the image to remove them. Follow these instructions:

1. Create a new `Dockerfile`, which removes the special characters in the LABEL, as shown below:
# Use the specified base image
FROM quay.io/soketi/soketi

# Add description label (remove special characters)
LABEL org.opencontainers.image.description="Next-gen, Pusher-compatible, open-source WebSockets server. Simple, fast, and resilient."
2. Build a new image using the `Dockerfile` created. Run the following command:
    docker build -t <domain>/<repositry>:latest .
3. Verify Special Characters Have Been Removed
Finally, confirm that the label of the new image no longer contains special characters. Use the following command to verify:
docker inspect <domain>/<repositry>:latest | grep org.opencontainers.image.description

 

User-added image 


Make sure the output does not display any special characters.

4. Use Docker to Push the Image
Once the build is complete, use Docker to push the newly built image to the target location:
    docker push <domain>/<repositry>:latest .
Conclusion 

By following the steps above, we can effectively remove special characters from the metadata of a Docker image, thereby preventing errors during the storage of this data in a MySQL database. This approach ensures smooth data storage and compatibility. If any issues arise during the process, please ensure that Docker and Skopeo tools are correctly installed and configured, which will help facilitate the entire workflow.