Week 0x8 I
Crypto
md5sum
of this file?vim mywork.c
podman build -t tester .
# COPY mywork.cpodman run tester python3 tester.py
vim mywork.c
podman run tester python3 tester.py
still gives negative on billion because the file systems are desynced.podman images
container repository.astyle
might be new to youClang-Tidy
coc
usually via npm
and (gags) neovimvim octal.c
astyle octal.c
astyle -h
(I’ve never read it).gcc \
vim \
python3 \
astyle
gcc
only after today.vim Containerfile
podman build -t crypto .
docker
documentation not podmanpodman
I think assumes you know what you are doing (I don’t)Arg | Meaning |
---|---|
podman | container command |
run | start a container from some image |
–mount | let container see files that live outside container |
Arg | Meaning |
---|---|
type=bind | the files will be the same in a host folder and container folder |
src= | This is the folder on the host |
$PWD/.. | This is the file above the current working directory |
$PWD
is a shell built-in like $?
..
directory on host be visible to container.Arg | Meaning |
---|---|
target= | This is the folder on the container |
/mnt | That is the mnt (mount) directory under root / |
-d | Start the container detached |
Arg | Meaning |
---|---|
-t | What should the name (tag) be of Container image? |
crypto | The tag I used during podman build |
/bin/bash | The executable to run within the container |
/mnt
refers to files on the host machineuser@DESKTOP-THMS2PJ:~/dev/crypto/repos/crypto/podman$ /bin/bash podman.sh
c25d7d0db5d60efca7c1140dd9b8217a27e511caa4f5a5fdf2fc21e90ad45f17
user@DESKTOP-THMS2PJ:~/dev/crypto/repos/crypto/podman$ ls ..
4096_t README.md enigma macros ops_ui podman rsainc shainc
user@DESKTOP-THMS2PJ:~/dev/crypto/repos/crypto/podman$ podman exec -it c2 /bin/bash
root@c25d7d0db5d6:/# ls /mnt
4096_t README.md enigma macros ops_ui podman rsainc shainc
root@c25d7d0db5d6:/#
gcc
inside that container.user@DESKTOP-THMS2PJ:~/dev/crypto/repos/crypto/podman$ cd ..
user@DESKTOP-THMS2PJ:~/dev/crypto/repos/crypto$ podman ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c25d7d0db5d6 localhost/crypto:latest /bin/bash 7 minutes ago Up 7 minutes ago determined_shockley
user@DESKTOP-THMS2PJ:~/dev/crypto/repos/crypto$ vim hi.c
user@DESKTOP-THMS2PJ:~/dev/crypto/repos/crypto$ cat hi.c
#include <stdio.h>
int main() {
printf("hi\n");
return 0;
}
user@DESKTOP-THMS2PJ:~/dev/crypto/repos/crypto$ podman exec -it c2 cat /mnt/hi.c
#include <stdio.h>
int main() {
printf("hi\n");
return 0;
}
exec
(run command)gcc
/mnt
filescmd.exe
from DOS, which runs .bat files.sh
script to mount folders:podman
commands are the same on all OSessrc
%cd% not
$PWD` gives the current directory.wsl
images from the Windows host, I didn’t try.C:\Users\cd-desk\Documents\dev\crypto\podman>podman machine start
Starting machine "podman-machine-default"
API forwarding for Docker API clients is not available due to the following startup failures.
could not start api proxy since expected pipe is not available: podman-machine-default
Podman clients are still able to connect.
Machine "podman-machine-default" started successfully
C:\Users\cd-desk\Documents\dev\crypto\podman>podman build -t crypto .
C:\Users\cd-desk\Documents\dev\crypto\podman>.\window.bat
C:\Users\cd-desk\Documents\dev\crypto\podman>podman run --mount type=bind,src=C:\Users\cd-desk\Documents\dev\crypto\podman\..,target=/mnt -d -t crypto /bin/bash
9a1b0fb2a8f87d3639149ee41fb2dcb822f5a7cbd971a39cdc77150a79774765
C:\Users\cd-desk\Documents\dev\crypto\podman>
vim
installed on Windows, but I don’t know when I did that or how.C:\Users\cd-desk\Documents\dev\crypto>podman exec -it 9a gcc /mnt/hi.c -o /mnt/hi.out
C:\Users\cd-desk\Documents\dev\crypto>dir hi.out
Volume in drive C has no label.
Volume Serial Number is 5CEC-43F9
Directory of C:\Users\cd-desk\Documents\dev\crypto
03/12/2025 05:33 PM 15,960 hi.out
1 File(s) 15,960 bytes
0 Dir(s) 99,378,515,968 bytes free
C:\Users\cd-desk\Documents\dev\crypto>
C:\Users\cd-desk\Documents\dev\crypto>podman exec -it 9a ./mnt/hi.out
i wrote this on windows lol meow
C:\Users\cd-desk\Documents\dev\crypto>