chore: Add dockerignore, Update editorconfig, Update dependencies

* Add dockerignore and update editorconfig for Dockerfile
* Abort docker build if arch is not supported
This commit is contained in:
Manuel 2023-10-17 00:00:00 +02:00
parent e35576fb3f
commit 2fd8f5d20b
Signed by: Manuel
GPG key ID: 4085037435E1F07A
7 changed files with 25 additions and 30 deletions

View file

@ -10,7 +10,8 @@ RUN apt-get update && \
"arm64") apt-get install -y gcc-aarch64-linux-gnu ;; \
"armv7") apt-get install -y gcc-arm-linux-gnueabihf ;; \
"riscv64") apt-get install -y gcc-riscv64-linux-gnu ;; \
*) apt-get install -y gcc ;; \
"amd64") apt-get install -y gcc ;; \
*) echo "Arch not supported" && exit 1 ;; \
esac
WORKDIR /tmp/app
@ -20,7 +21,8 @@ RUN go mod download && \
"arm64") export CC="aarch64-linux-gnu-gcc" PIE=true ;; \
"armv7") export CC="arm-linux-gnueabihf-gcc" GOARM="7" ;; \
"riscv64") export CC="riscv64-linux-gnu-gcc" ;; \
*) export CC="gcc" PIE=true ;; \
"amd64") export CC="gcc" PIE=true ;; \
*) echo "Arch not supported" && exit 1 ;; \
esac && \
export CGO_ENABLED=1 && \
if [ $PIE = true ]; then \