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:
parent
e35576fb3f
commit
2fd8f5d20b
7 changed files with 25 additions and 30 deletions
|
@ -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 \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue