File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ jlink-flash-factory-setup: | build
129129jlink-flash-firmware-semihosting : | build-semihosting
130130 JLinkExe -if SWD -device ATSAMD51J20 -speed 4000 -autoconnect 1 -CommanderScript ./build-semihosting/scripts/firmware.jlink
131131dockerinit :
132- ./scripts/container.sh build --pull --force-rm --no-cache -t shiftcrypto/firmware_v2 .
132+ ./scripts/container.sh build --pull --platform linux/amd64 -- force-rm --no-cache -t shiftcrypto/firmware_v2 .
133133dockerdev :
134134 ./scripts/dockerenv.sh
135135dockerrel :
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ dockerdev () {
4141
4242 if ! $RUNTIME images --filter " reference=${CONTAINER_IMAGE} " | grep -q " ${CONTAINER_IMAGE} " ; then
4343 echo " No '${CONTAINER_IMAGE} ' ${RUNTIME} image found! Maybe you need to run
44- '${RUNTIME} build --pull -t ${CONTAINER_IMAGE} .'?" >&2
44+ '${RUNTIME} build --platform linux/amd64 -- pull -t ${CONTAINER_IMAGE} .'?" >&2
4545 exit 1
4646 fi
4747
@@ -74,8 +74,11 @@ dockerdev () {
7474 # Use same user/group id as on the host, so that files are not created as root in the
7575 # mounted volume. Only needed for Docker. On rootless podman, the host user maps to the
7676 # container root user.
77- $RUNTIME exec -it " $CONTAINER_NAME " groupadd -o -g " $( id -g) " dockergroup
78- $RUNTIME exec -it " $CONTAINER_NAME " useradd -u " $( id -u) " -m -g dockergroup dockeruser
77+ # If group already exists, don't create it
78+ if ! $RUNTIME exec -it " $CONTAINER_NAME " getent group " $( id -g) " > /dev/null ; then
79+ $RUNTIME exec -it " $CONTAINER_NAME " groupadd -o -g " $( id -g) " dockergroup
80+ fi
81+ $RUNTIME exec -it " $CONTAINER_NAME " useradd -u " $( id -u) " -m -g " $( id -g) " dockeruser
7982 fi
8083
8184 # Call a second time to enter the container.
You can’t perform that action at this time.
0 commit comments