Skip to content

Commit

Permalink
Merge pull request #2 from Trocdigital/add_new_lenguage_dockerfile
Browse files Browse the repository at this point in the history
update script docker-publish.yaml new version actions v4
  • Loading branch information
phenobarbital authored Sep 11, 2024
2 parents d960162 + c720d82 commit f98ff28
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@ jobs:

steps:
- uses: actions/checkout@v3

- name: Build the Docker image
run: docker build --no-cache --force-rm ./

push_to_registry:
needs: [build]
needs: build
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
Expand All @@ -34,21 +36,21 @@ jobs:
uses: docker/setup-buildx-action@v2

- name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
uses: docker/metadata-action@v4.1.7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@v2
uses: docker/build-push-action@v4
with:
context: "{{defaultContext}}"
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
11 changes: 5 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.11.9-slim-bookworm as builder
FROM python:3.11.9-slim-bookworm AS builder

USER root

Expand All @@ -19,15 +19,15 @@ RUN apt-get update -y && apt-get install -y \
# Install locales package
RUN apt-get update && apt-get install -y locales

# Set the locale to en_US.UTF-8
# Set the locale to en_US.UTF-8 and other languages
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen
RUN for lang in en_US.UTF-8 es_ES.UTF-8 zh_CN.UTF-8 zh_TW.UTF-8 fr.UTF-8 de.UTF-8 tr.UTF-8 ja.UTF-8 ko.UTF-8; do locale-gen $lang; done
RUN update-locale

# Set environment variables for the locale
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8
ENV LANG_ZH_CN=zh_CN.UTF-8
ENV LANG_ZH_TW=zh_TW.UTF-8
ENV LANG_KO=ko.UTF-8
Expand All @@ -37,7 +37,6 @@ ENV LANG_ES=es_ES.UTF-8
ENV LANG_DE=de.UTF-8
ENV LANG_FR=fr.UTF-8


# Clean up
RUN apt-get clean && rm -rf /var/lib/apt/lists/*

Expand Down

0 comments on commit f98ff28

Please sign in to comment.