-
Notifications
You must be signed in to change notification settings - Fork 3k
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
"az acr build" fails with UnicodeEncodeError #19042
Comments
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @toddysm, @luisdlp, @northtyphoon. Issue DetailsDescribe the bug To Reproduce Expected behavior Environment summary Install method:
CLI version (
OS Version:
Shell:
Additional context In order to reduce costs, the first self-hosted agent instance (lets call it agent-instance-1) is built using a Microsoft-hosted agent and is built and deployed without any issues. Part of the agent creation consists in installing the package openjdk-8-jdk using apt. During installation, the package
Observations From what I can tell, the error occurs when parsing the docker output coming from ACR. I've tried setting up the env variables
|
route to service team |
@northtyphoon It is another occurrence of #14774. |
@CCostaT As mentioned by #14774 (comment), could you try to configure the correct |
Hi @shizhMSFT, that link didn't work for me (localectl doesn't work in ubuntu docker images) but it pointed me to the right solution! Thank you. I got it working now by adding the following to my
Note that this requires the PS: This was based on the solution provided here |
Hi @CCostaT , i am facing the same issue in my Azure CLI task, tried using Microsoft hosted agent, didn't work, also tried using the above commands in my docker file, its showing the same error. Repro:
Docker file: #To make it easier for build and release pipelines to run apt-get, ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y \
#no-install-recommends #installl helm RUN curl -LsS https://aka.ms/InstallAzureCLIDeb | bash ARG TARGETARCH=amd64 WORKDIR /azp COPY start.sh . #install jdk ENV JAVA_HOME_11_X64=/usr/lib/jvm/java-11-openjdk-amd64 #install kubectl #install azure devops cli #/bin/java |
Hi @v-mohithgc . I'm not entirely sure what could be wrong but It seems you are installing and cleaning stuff in the wrong order. Your docker file installs the
and only afterwards do you install all the other required packages:
What I did was install everything using one
|
Describe the bug
Running
az acr build
task in a Microsoft-hosted agent succeeds but when running in a self-hosted agent it fails withUnicodeEncodeError: 'ascii' codec can't encode character '\u0151' in position 834: ordinal not in range(128)
To Reproduce
az acr build --registry {} --file {} --build-arg nocache=true --build-arg {} --image agent:tag {}
Expected behavior
A new docker image is built and pushed to ACR
Environment summary
Install method:
CLI version (
az --version
):OS Version:
Shell:
Additional context
For my project, I need to run various instances of the same self-hosted agent in different agent pools.
We use docker to create the self-hosted agent images that are then deployed to AKS. All self-hosted agents share the same code and dockerfile (they just differ in the agent name and the pool they connect to) .
As part of an upgrade, I need to use ACR build tasks to replace the docker commands when creating the self-hosted agent images.
In order to reduce costs, the first self-hosted agent instance (lets call it agent-instance-1) is built using a Microsoft-hosted agent and is built and deployed without any issues.
The second instance (agent-instance-2) is built using the self-hosted agent agent-instance-1 and it fails when running the acr build task.
Part of the agent creation consists in installing the package openjdk-8-jdk using apt. During installation, the package
ca-certificates-java (20190405ubuntu1)
is also installed and this is the point where the error occurs.Observations
From what I can tell, the error occurs when parsing the docker output coming from ACR. I've tried setting up the env variables
PYTHONIOENCODING=utf8
andPYTHONUTF8=1
but to no avail.When running the pipeline using Microsoft-hosted agents no such error occurs.
The text was updated successfully, but these errors were encountered: