1: sudo apt-get update
2: sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
3: curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
4: sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
5: sudo apt-get update
6: sudo apt-get install docker-ce
7: sudo systemctl start docker
8: sudo systemctl enable docker
9: docker --version
下載Dockerfile
1: git clone https://code.videolan.org/videolan/docker-images.git
2: docker-images/vlc-debian-android
3: vi Dockerfile 加入samba net-tools vim sudo 以及
usermod -aG sudo videolan && \
編譯image
1: cd vlc-debian-android
2: sudo docker build -t vlc-android .
查詢image
1: sudo docker images
start image
1: sudo docker run --net=host -it vlc-android /bin/bash
移除image
1: sudo docker rmi -f vlc-android
完全刪除
1: sudo docker system prune
查詢有哪些container
1: sudo docker ps -a
start container
1: sudo docker start 1f2bba458942
或者 sudo docker start -ia f8727992105f 之後直接進入container
或者 sudo docker container start -ia f8727992105f
stop container
1: sudo docker stop 1f2bba458942
進入container
1: sudo docker exec -it 1f2bba458942 /bin/bash
用這種方式進入container, 在container 下exit的話, container狀態依然為UP
刪除container
1: sudo docker rm 6294bd95d011
查詢有哪些container
1: sudo docker ps -a
start container
1: sudo docker start 1f2bba458942
或者 sudo docker start -ia f8727992105f 之後直接進入container
或者 sudo docker container start -ia f8727992105f
stop container
1: sudo docker stop 1f2bba458942
進入container
1: sudo docker exec -it 1f2bba458942 /bin/bash
用這種方式進入container, 在container 下exit的話, container狀態依然為UP
刪除container
1: sudo docker rm 6294bd95d011
samba設定:
1: sudo vim /etc/samba/smb.conf
[test]
path = /home/videolan/work
available = yes
valid users = videolan
read only = no
browseable = yes
public = yes
writable = yes
2: sudo smbpasswd -a videolan
3: sudo /etc/init.d/smbd restart
vlc-android編譯:
1:
export ANDROID_SDK=/sdk/android-sdk-linux
export ANDROID_NDK=/sdk/android-ndk-r18b
export PATH=$PATH:$ANDROID_SDK/platform-tools:$ANDROID_SDK/tools:$ANDROID_NDK
https://code.videolan.org/videolan/vlc-android.git
git checkout 3.1.7 3.1.7
修改java heap size
如果發現以下錯誤修改heap size
java.io.UncheckedIOException: java.io.IOException: Execution of compression failed
vim vlc-android/vlc-android/build.gradle
javaMaxHeapSize "4g"
vim vlc-android/gradle.properties
org.gradle.jvmargs=-Xmx4g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
vim /home/videolan/vlc-android/gradle/wrapper/gradle-wrapper.properties
改為5.1.1
vim vlc/contrib/src/modplug/rules.mak
改為0.8.9.0
git checkout 3.1.7 3.1.7
修改java heap size
如果發現以下錯誤修改heap size
java.io.UncheckedIOException: java.io.IOException: Execution of compression failed
vim vlc-android/vlc-android/build.gradle
javaMaxHeapSize "4g"
vim vlc-android/gradle.properties
org.gradle.jvmargs=-Xmx4g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
vim /home/videolan/vlc-android/gradle/wrapper/gradle-wrapper.properties
改為5.1.1
vim vlc/contrib/src/modplug/rules.mak
改為0.8.9.0
./compile.sh -a armeabi-v7a
./compile.sh release
./compile.sh release -a armeabi-v7a
./compile.sh release -a armeabi-v7a
./compile.sh -l -a armeabi-v7a -r
#在vlc 3.1.7 版遇到的困難modplug需要0.8.9.0 但是改rules.mak完之後, 會還原之前的code
原因是出在compile.sh, 修改如下即可.
if [ "$RELEASE" = 1 ]; then
- git reset --hard ${TESTED_HASH}
- git am ../libvlc/patches/*.patch
+ echo "haha"
+ #git reset --hard ${TESTED_HASH}
+ #git am ../libvlc/patches/*.patch
fi
對不起~我不是很熟docker,請問 vi Dockerfile 要怎麼加入samba net-tools vim sudo 以及
回覆刪除usermod -aG sudo videolan && \
是加在RUN的前半段還是後半段呢?
謝謝
https://ibb.co/zXjW417
刪除