feat: update docker file

- remove unnecessary docker dependencies
- add full functionality to docker-build.sh file
- mini bugfixes
This commit is contained in:
Aliberk Sandıkçı 2023-08-09 23:47:40 +03:00
parent eefc88c3c2
commit 3dab30462a
Signed by: asandikci
GPG key ID: 25C67A03B5666BC1
2 changed files with 11 additions and 12 deletions

View file

@ -1,7 +1,7 @@
# docker build -t IMAGE_NAME:VERSION . # docker build -t IMAGE_NAME:VERSION .
# after cd ahenk-go # after cd ahenk-go
# docker run -it -d --ulimit nofile=1024:524288 --name CONT_NAME --mount type=bind,source=".",target=/ahenk-go/ IMAGE_NAME:VERSION "/bin/bash" # docker run -it -d --name CONT_NAME --mount type=bind,source=".",target=/ahenk-go/ IMAGE_NAME:VERSION "/bin/bash"
ARG CODE_VERSION=latest ARG CODE_VERSION=latest
@ -16,18 +16,12 @@ RUN apt-get upgrade -y
RUN apt-get install curl wget tree nano -y RUN apt-get install curl wget tree nano -y
### INSTALL BUILD DEPENDENCIES ### ### INSTALL BUILD DEPENDENCIES ###
RUN apt-get install pbuilder -y
RUN apt-get install dh-golang -y RUN apt-get install dh-golang -y
RUN apt-get install dh-make-golang -y RUN apt-get install dh-make-golang -y
RUN apt-get install cowbuilder -y
RUN apt-get install golang-github-sevlyar-go-daemon-dev -y RUN apt-get install golang-github-sevlyar-go-daemon-dev -y
RUN apt-get install golang-golang-x-exp-dev -y RUN apt-get install golang-golang-x-exp-dev -y
### CONFIGURATIONS ### ### CONFIGURATIONS ###
RUN mkdir /var/cache/pbuilder/base.cow
# RUN cowbuilder --create
# FIXME Build Error
# Enable UTF8 Encoding # Enable UTF8 Encoding
RUN echo "LC_ALL=en_US.UTF-8" >> /etc/environment RUN echo "LC_ALL=en_US.UTF-8" >> /etc/environment
RUN echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen RUN echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen

View file

@ -13,16 +13,15 @@ cd /build || exit
dh-make-golang make -allow_unknown_hoster "$GIT_HOST/$GIT_ORG/$GIT_REPO" dh-make-golang make -allow_unknown_hoster "$GIT_HOST/$GIT_ORG/$GIT_REPO"
# TODO Add option to disable writing all these files all the time (-s --skip) # TODO Add option to disable writing all these files all the time (-s --skip)
nano itp-ahenk-go.txt nano "itp-$GIT_REPO.txt"
sendmail -t < itp-ahenk-go.txt sendmail -t < "itp-$GIT_REPO.txt"
cd ahenk-go || exit cd $GIT_REPO || exit
grep --color=always -r TODO debian grep --color=always -r TODO debian
echo -e "\nThese files needs review. Starting reviewing automatically in 10sec...\n" echo -e "\nThese files needs review. Starting reviewing automatically in 10sec...\n"
sleep 10 sleep 10
# TODO Allow users to escape from automatic review and manually do it while in this script # TODO Allow users to escape from automatic review and manually do it while in this script
# Edit files that contains TODO keyword until there is none of them
while [[ $(grep -r TODO debian | wc --lines) -ne 0 ]] while [[ $(grep -r TODO debian | wc --lines) -ne 0 ]]
do do
nano "$(grep -r TODO debian | awk '{sub(/:.*/,"")} NR==1')" nano "$(grep -r TODO debian | awk '{sub(/:.*/,"")} NR==1')"
@ -42,4 +41,10 @@ head -100 debian/**/*
# TODO ask user to continue # TODO ask user to continue
git add debian && git commit -a -m 'Initial packaging' git add debian && git commit -a -m 'Initial packaging'
gbp buildpackage
lintian -- *.changes
echo -e "SOLVE LINTIAN ERRORS / WARNINGS\nAFTER THAT, PUSH REPO"