Преглед изворни кода

darkirc: switch recommendation from docker to podman for android builds

darkfi пре 2 година
родитељ
комит
6de436658b
3 измењених фајлова са 14 додато и 10 уклоњено
  1. 4 3
      bin/darkirc/Makefile
  2. 1 1
      bin/darkirc/android.Dockerfile
  3. 9 6
      doc/src/misc/darkirc/darkirc.md

+ 4 - 3
bin/darkirc/Makefile

@@ -53,11 +53,12 @@ $(BIN).android64:
 #	cp -f ../../target/armv7-linux-androideabi/release/$(BIN) $(BIN).$@
 #	cp -f ../../target/armv7-linux-androideabi/release/$(BIN) $(BIN).$@
 
 
 # This target doesn't require installing any packages from Android Studio
 # This target doesn't require installing any packages from Android Studio
-docker-android:
-	docker build -t test:latest . --file android.Dockerfile
+podman-android:
+	# s/podman/docker/ if you are using docker instead
+	podman build -t test:latest . --file android.Dockerfile
 	# Use this command to get an interactive terminal inside docker:
 	# Use this command to get an interactive terminal inside docker:
 	#docker run -v $(shell pwd)/../../:/root/src -it test:latest /bin/bash
 	#docker run -v $(shell pwd)/../../:/root/src -it test:latest /bin/bash
-	docker run --rm -v $(shell pwd)/../../:/root/src -t test:latest make _aarch64-android
+	podman run --rm -v $(shell pwd)/../../:/root/src -t test:latest make _aarch64-android
 	cp -f ../../target/aarch64-linux-android/release/darkirc darkirc.aarch64-android
 	cp -f ../../target/aarch64-linux-android/release/darkirc darkirc.aarch64-android
 # Invoked inside docker by the command above
 # Invoked inside docker by the command above
 # We need to mount this directory as a volume using -v so docker can access it
 # We need to mount this directory as a volume using -v so docker can access it

+ 1 - 1
bin/darkirc/android.Dockerfile

@@ -1,4 +1,4 @@
-FROM ubuntu
+FROM docker.io/ubuntu
 ENV DEBIAN_FRONTEND noninteractive
 ENV DEBIAN_FRONTEND noninteractive
 
 
 RUN apt-get update
 RUN apt-get update

+ 9 - 6
doc/src/misc/darkirc/darkirc.md

@@ -41,12 +41,15 @@ This is for Android 64 bit (which is most phones).
 You will compile darkirc on your computer then copy it to your phone
 You will compile darkirc on your computer then copy it to your phone
 and run it in Termux (a command-line terminal for Android).
 and run it in Termux (a command-line terminal for Android).
 
 
-1. Setup Docker on your computer which may look like:
-    1. Install docker and docker-buildx packages.
-    2. Enable the docker daemon service.
-    3. Add your user to the docker group and refresh the session
-       (either with `su -c $USER` or logout/login).
-2. Run `cd bin/darkirc/ && make docker-android`. The resulting file 
+We will use podman which is a secure replacement for docker. However if you
+prefer to use docker just be aware of
+[the security risks](https://docs.docker.com/engine/security/#docker-daemon-attack-surface).
+Podman is a drop in replacement.
+
+1. Setup podman on your computer which may look like:
+    1. Install podman package
+    2. Enable the podman daemon service.
+2. Run `cd bin/darkirc/ && make podman-android`. The resulting file 
     will be called `darkirc.aarch64-android` (it might be needed to 
     will be called `darkirc.aarch64-android` (it might be needed to 
     make the file executable `chmod +x darkirc.aarch64-android`). 
     make the file executable `chmod +x darkirc.aarch64-android`). 
     Copy this to your phone.
     Copy this to your phone.