Fixes to build and build for multiple architectures

This commit is contained in:
Deon George 2021-03-16 00:01:45 +11:00
parent c4f4a25f36
commit 463cedb7ad
4 changed files with 20 additions and 21 deletions

View File

@ -1,5 +1,5 @@
stages: stages:
- build - build
variables: variables:
CACHETAG: build-${VERSION} CACHETAG: build-${VERSION}

View File

@ -1,11 +1,11 @@
armv7l:build: build:armv7l:
variables: variables:
VERSION: armv7l-buster VERSION: armv7l
stage: build stage: build
image: docker:latest image: docker:latest
script: script:
- if [ -f init ]; then chmod 500 init; fi - if [ -f init ]; then chmod 500 init; fi
- docker pull ${CI_REGISTRY_IMAGE}:${CACHETAG} || true - ([ -z "$REFRESH" ] && docker pull ${CI_REGISTRY_IMAGE}:${CACHETAG}) || true
- docker build --cache-from ${CI_REGISTRY_IMAGE}:${CACHETAG} -t ${CI_REGISTRY_IMAGE}:${VERSION} -t ${CI_REGISTRY_IMAGE}:${CACHETAG} . - docker build --cache-from ${CI_REGISTRY_IMAGE}:${CACHETAG} -t ${CI_REGISTRY_IMAGE}:${VERSION} -t ${CI_REGISTRY_IMAGE}:${CACHETAG} .
- docker push ${CI_REGISTRY_IMAGE}:${VERSION} - docker push ${CI_REGISTRY_IMAGE}:${VERSION}
- docker push ${CI_REGISTRY_IMAGE}:${CACHETAG} - docker push ${CI_REGISTRY_IMAGE}:${CACHETAG}
@ -13,4 +13,4 @@ armv7l:build:
- docker - docker
- armv7l - armv7l
only: only:
- buster - master

View File

@ -1,11 +1,11 @@
x86_64:build: build:x86_64:
variables: variables:
VERSION: x86_64 VERSION: x86_64
stage: build stage: build
image: docker:latest image: docker:latest
script: script:
- if [ -f init ]; then chmod 500 init; fi - if [ -f init ]; then chmod 500 init; fi
- ([ -z "$REFRESH" ] && docker pull ${CI_REGISTRY_IMAGE}:${CACHETAG}) || echo "true" - ([ -z "$REFRESH" ] && docker pull ${CI_REGISTRY_IMAGE}:${CACHETAG}) || true
- docker build --cache-from ${CI_REGISTRY_IMAGE}:${CACHETAG} -t ${CI_REGISTRY_IMAGE}:${VERSION} -t ${CI_REGISTRY_IMAGE}:${CACHETAG} . - docker build --cache-from ${CI_REGISTRY_IMAGE}:${CACHETAG} -t ${CI_REGISTRY_IMAGE}:${VERSION} -t ${CI_REGISTRY_IMAGE}:${CACHETAG} .
- docker push ${CI_REGISTRY_IMAGE}:${VERSION} - docker push ${CI_REGISTRY_IMAGE}:${VERSION}
- docker push ${CI_REGISTRY_IMAGE}:${CACHETAG} - docker push ${CI_REGISTRY_IMAGE}:${CACHETAG}

View File

@ -26,7 +26,6 @@ RUN apt-get update \
&& apt-get clean \ && apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
COPY doorparty-connector.ini /etc
COPY sshd_config /etc/ssh COPY sshd_config /etc/ssh
COPY init /sbin/init COPY init /sbin/init