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
129
129
jlink-flash-firmware-semihosting : | build-semihosting
130
130
JLinkExe -if SWD -device ATSAMD51J20 -speed 4000 -autoconnect 1 -CommanderScript ./build-semihosting/scripts/firmware.jlink
131
131
dockerinit :
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 .
133
133
dockerdev :
134
134
./scripts/dockerenv.sh
135
135
dockerrel :
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ dockerdev () {
41
41
42
42
if ! $RUNTIME images --filter " reference=${CONTAINER_IMAGE} " | grep -q " ${CONTAINER_IMAGE} " ; then
43
43
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
45
45
exit 1
46
46
fi
47
47
@@ -74,8 +74,11 @@ dockerdev () {
74
74
# Use same user/group id as on the host, so that files are not created as root in the
75
75
# mounted volume. Only needed for Docker. On rootless podman, the host user maps to the
76
76
# 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
79
82
fi
80
83
81
84
# Call a second time to enter the container.
You can’t perform that action at this time.
0 commit comments