- Newest
- Most votes
- Most comments
Hello,
Instead of using apprunner.yaml, you can:
Customize a Docker Container:
- Build a Docker container locally with your required locale settings.
- Push the container to Amazon ECR.
- Use this custom container in AWS App Runner.
Install Locale Packages in apprunner.yaml:
- If you prefer using apprunner.yaml, add the necessary locale package installation:
version: 1.0
runtime: python311
build:
commands:
pre-build:
- yum install -y glibc-all-langpacks
- export LC_ALL=es_ES.UTF-8
- export LC_TIME=es_ES.UTF-8
- export LANG=es_ES.UTF-8
build:
- pip3 install pipenv
- pipenv install
run:
runtime-version: 3.11.9
pre-run:
- pip3 install pipenv
- pipenv install
command: pipenv run gunicorn conf.wsgi --workers 2 --log-file -
network:
port: 8000
https://docs.aws.amazon.com/linux/al2023/ug/image-comparison.html
Hello.
Instead of building with apprunner.yaml, I think you can customize the container as you like by building the container using Dockerfile etc. on your local PC and pulling it from ECR to AppRunner.
When using apprunner.yaml, the container OS seems to be based on Amazon Linux, so you may be able to install it by adding "yum glibc-all-langpacks" to the build section.
https://docs.aws.amazon.com/apprunner/latest/dg/service-source-code.html#service-source-code.managed-platforms
This image is based on the Amazon Linux Docker image and contains a language runtime package as well as some tools and popular dependency packages.
If Amazon Linux 2023 is used, I think "glibc-all-langpacks" can be installed.
https://docs.aws.amazon.com/linux/al2023/ug/image-comparison.html
Relevant content
- asked a year ago
- asked 3 years ago
I tried your solution and it worked, thanks. Also I had to add the following line in the pre-build to set the language: localedef -i en_ES -f UTF-8 en_ES.UTF-8