Skip to content

Commit

Permalink
feat: ajustes
Browse files Browse the repository at this point in the history
  • Loading branch information
jacksonveroneze committed Oct 14, 2024
1 parent 734edcd commit 51e1d4a
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/pipeline-create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,15 @@ jobs:
run: |
echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
- name: Base - Build and Push
- name: Build and Push (net)
run: |
cd net
./build.sh
./create-tag.sh
./push.sh
shell: bash

- name: Build and Push (asp.net)
run: |
cd Aspnet/Base
./build.sh
Expand Down
33 changes: 33 additions & 0 deletions net/Debian/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM mcr.microsoft.com/dotnet/runtime:8.0-bookworm-slim

# .NET envs
ENV DOTNET_ENVIRONMENT=Production
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false

# TZ/LANG envs
ENV TZ America/Sao_Paulo
ENV LANG pt_BR.UTF-8
ENV LANGUAGE pt_BR.UTF-8
ENV LC_ALL pt_BR.UTF-8

RUN apt update && \
apt upgrade -y && \
apt install -y --no-install-recommends locales curl && \
apt clean && apt autoclean && apt autoremove -y && \
rm -rf /var/lib/apt/lists/*

RUN echo $TZ > /etc/timezone && \
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
dpkg-reconfigure -f noninteractive tzdata

RUN echo "locales locales/locales_to_be_generated multiselect pt_BR.UTF-8 UTF-8" | debconf-set-selections && \
rm /etc/locale.gen && \
dpkg-reconfigure --frontend noninteractive locales

COPY docker-entrypoint.sh /home/app

USER app

WORKDIR /home/app

ENTRYPOINT ["/bin/sh", "docker-entrypoint.sh"]
4 changes: 4 additions & 0 deletions net/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

#Debian
docker build -f ./Debian/Dockerfile -t jacksonveroneze/net:8.0-debian .
6 changes: 6 additions & 0 deletions net/create-tag.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

RELEASE="${RELEASE=latest}"

#Debian
docker tag jacksonveroneze/net:8.0-debian jacksonveroneze/net:8.0-debian-$RELEASE
13 changes: 13 additions & 0 deletions net/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh

OS=$(cat /etc/*-release | egrep "PRETTY_NAME" | cut -d = -f 2 | tr -d '"')

APP_NAME=$(find . -type f -name "*deps.json" | xargs)
APP_NAME=$(echo $APP_NAME | xargs | sed -e "s/.\///g;s/.deps.json/\.dll/g")

echo "- SystemOperation: $OS"
echo "- Environment: $DOTNET_ENVIRONMENT"
echo ""
echo "- Run application: $APP_NAME"

dotnet $APP_NAME
6 changes: 6 additions & 0 deletions net/push.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

RELEASE="${RELEASE=latest}"

#Debian
docker push jacksonveroneze/net:8.0-debian-$RELEASE

0 comments on commit 51e1d4a

Please sign in to comment.