Compare commits
No commits in common. "36eed976f2de7d251237819a00131ab46b278555" and "08f5d3407934bd764a14cbe6a88cd23f6e5b44af" have entirely different histories.
36eed976f2
...
08f5d34079
2 changed files with 2 additions and 15 deletions
|
@ -44,22 +44,13 @@ fi
|
|||
# Run the container
|
||||
echo "Starting container..."
|
||||
$CONTAINER_CMD run --name ${CONTAINER_NAME} \
|
||||
-p 127.0.0.1:8000:8000 \
|
||||
-p 8000:8000 \
|
||||
-v "$SOURCE_DIR":/home/appuser/app/source${VOLUME_FLAG} \
|
||||
--read-only \
|
||||
--security-opt no-new-privileges:true \
|
||||
--cap-drop ALL \
|
||||
--user 1000:1000 \
|
||||
-d ${CONTAINER_NAME}:latest
|
||||
|
||||
|
||||
echo $(podman inspect ${CONTAINER_NAME} --format '{{.State.Pid}}')
|
||||
|
||||
sudo nsenter -t $(podman inspect ${CONTAINER_NAME} --format '{{.State.Pid}}') -n nft add table inet filter
|
||||
sudo nsenter -t $(podman inspect ${CONTAINER_NAME} --format '{{.State.Pid}}') -n nft add chain inet filter output { type filter hook output priority 0 \; policy drop \; }
|
||||
sudo nsenter -t $(podman inspect ${CONTAINER_NAME} --format '{{.State.Pid}}') -n \
|
||||
nft add rule inet filter output oif lo accept
|
||||
|
||||
# Check if container started successfully
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Container started successfully!"
|
||||
|
@ -75,4 +66,4 @@ if [ $? -eq 0 ]; then
|
|||
else
|
||||
echo "Failed to start container."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
4
source/.gitignore
vendored
4
source/.gitignore
vendored
|
@ -1,4 +0,0 @@
|
|||
# Ignore everything in this directory
|
||||
*
|
||||
# Except this file
|
||||
!.gitignore
|
Loading…
Add table
Add a link
Reference in a new issue