Digital ocean droplet docker build no space available error

Docker is creating this issue on each new re-build on github actions any idea how can I prevent this like what can I include in the script of github actions? You are running out of disk space. The runner will stop working when the machine runs out of disk space. Free space left: 29 MB The error is very misleading because normally it is probably doing something wrong or unconfigured so it is filling a lot of space somehow which each re-build normally i don't have anything on my ubuntu server (digital ocean droplet)
48 Replies
Unknown User
Unknown Userā€¢3y ago
Message Not Public
Sign In & Join Server To View
Mert Efe
Mert EfeOPā€¢3y ago
I do prune command But why wouldn't prune command be working ? yes the docker images are there indeed
Unknown User
Unknown Userā€¢3y ago
Message Not Public
Sign In & Join Server To View
Mert Efe
Mert EfeOPā€¢3y ago
yes u was right docker ps -a showed me can u help me with my command do clean up?
- name: Clear all containers and images
run: |-
ids=$(docker ps -a -q)
for id in $ids
do
echo "$id"
docker stop $id && docker rm $id
done
docker system prune -a --volumes
- name: Clear all containers and images
run: |-
ids=$(docker ps -a -q)
for id in $ids
do
echo "$id"
docker stop $id && docker rm $id
done
docker system prune -a --volumes
Unknown User
Unknown Userā€¢3y ago
Message Not Public
Sign In & Join Server To View
Mert Efe
Mert EfeOPā€¢3y ago
if i switch to docker-compose would that make it easier to handle?
Unknown User
Unknown Userā€¢3y ago
Message Not Public
Sign In & Join Server To View
Mert Efe
Mert EfeOPā€¢3y ago
no i'm just trying to god damn upload to digital ocean droplet through github actions it's not working i mean why these things are so bothersome i can't even stop container in github action
Unknown User
Unknown Userā€¢3y ago
Message Not Public
Sign In & Join Server To View
Mert Efe
Mert EfeOPā€¢3y ago
yeah thanks @clumsyninja96 can u help me get my script straight for github actions?
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
NODE_ENV: ${{ secrets.NODE_ENV }}
PAYPAL_SANDBOX_CLIENT_ID: ${{ secrets.PAYPAL_SANDBOX_CLIENT_ID }}
PAYPAL_SANDBOX_CLIENT_SECRET: ${{ secrets.PAYPAL_SANDBOX_CLIENT_SECRET }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
SENDGRID_API_KEY: ${{ secrets.SENDGRID_API_KEY }}
STRIPE_ENDPOINT_TEST_KEY: ${{ secrets.STRIPE_ENDPOINT_TEST_KEY }}
STRIPE_SECRET_KEY: ${{ secrets.STRIPE_SECRET_KEY }}
STRIPE_SK_TEST_KEY: ${{ secrets.STRIPE_SK_TEST_KEY }}
STRIPE_WEBHOOK_SECRET: ${{ secrets.STRIPE_WEBHOOK_SECRET }}
jobs:
build:
runs-on: self-hosted
strategy:
matrix:
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- name: Checkoutdocer stop api:latest
uses: actions/checkout@v3


- name: Build docker image
run: |-
docker build -t "api:latest" .

- name: Deploy docker image
run: |-
docker stop api:latest \
docker run --name api -d -p 8080:8080 --restart unless-stopped -e DATABASE_URL="..." -e NODE_ENV=production api:latest
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
NODE_ENV: ${{ secrets.NODE_ENV }}
PAYPAL_SANDBOX_CLIENT_ID: ${{ secrets.PAYPAL_SANDBOX_CLIENT_ID }}
PAYPAL_SANDBOX_CLIENT_SECRET: ${{ secrets.PAYPAL_SANDBOX_CLIENT_SECRET }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
SENDGRID_API_KEY: ${{ secrets.SENDGRID_API_KEY }}
STRIPE_ENDPOINT_TEST_KEY: ${{ secrets.STRIPE_ENDPOINT_TEST_KEY }}
STRIPE_SECRET_KEY: ${{ secrets.STRIPE_SECRET_KEY }}
STRIPE_SK_TEST_KEY: ${{ secrets.STRIPE_SK_TEST_KEY }}
STRIPE_WEBHOOK_SECRET: ${{ secrets.STRIPE_WEBHOOK_SECRET }}
jobs:
build:
runs-on: self-hosted
strategy:
matrix:
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- name: Checkoutdocer stop api:latest
uses: actions/checkout@v3


- name: Build docker image
run: |-
docker build -t "api:latest" .

- name: Deploy docker image
run: |-
docker stop api:latest \
docker run --name api -d -p 8080:8080 --restart unless-stopped -e DATABASE_URL="..." -e NODE_ENV=production api:latest
Unknown User
Unknown Userā€¢3y ago
Message Not Public
Sign In & Join Server To View
Mert Efe
Mert EfeOPā€¢3y ago
my friend who knows a bit devops helped me yesterday but we've left off in the half of it. the last command did run successfully 1 time only. so my whole goal is to use docker through digital ocean droplet. by triggering github actions.
Unknown User
Unknown Userā€¢3y ago
Message Not Public
Sign In & Join Server To View
Mert Efe
Mert EfeOPā€¢3y ago
I have my dockerfile
FROM node:16-alpine
WORKDIR /usr/src/app
COPY ./ ./
RUN npm install

RUN npm run build --if-present

EXPOSE 8080

CMD ["node", "index.js"]
FROM node:16-alpine
WORKDIR /usr/src/app
COPY ./ ./
RUN npm install

RUN npm run build --if-present

EXPOSE 8080

CMD ["node", "index.js"]
Unknown User
Unknown Userā€¢3y ago
Message Not Public
Sign In & Join Server To View
Mert Efe
Mert EfeOPā€¢3y ago
thank you for trying. yes i get let me show you.
Mert Efe
Mert EfeOPā€¢3y ago
I mean this error...
Mert Efe
Mert EfeOPā€¢3y ago
it's just funny
Unknown User
Unknown Userā€¢3y ago
Message Not Public
Sign In & Join Server To View
Mert Efe
Mert EfeOPā€¢3y ago
Mert Efe
Mert EfeOPā€¢3y ago
@clumsyninja96 man this is really unnerving
Unknown User
Unknown Userā€¢3y ago
Message Not Public
Sign In & Join Server To View
Mert Efe
Mert EfeOPā€¢3y ago
Mert Efe
Mert EfeOPā€¢3y ago
@clumsyninja96 bro could I be having troubles because I'm not using compose?
Unknown User
Unknown Userā€¢3y ago
Message Not Public
Sign In & Join Server To View
Mert Efe
Mert EfeOPā€¢3y ago
I stopped all containers before started that one šŸ˜¦ even deleted all of them.
Unknown User
Unknown Userā€¢3y ago
Message Not Public
Sign In & Join Server To View
Mert Efe
Mert EfeOPā€¢3y ago
I see this
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
node 1085 root 18u IPv6 20856 0t0 TCP *:http-alt (LISTEN)
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
node 1085 root 18u IPv6 20856 0t0 TCP *:http-alt (LISTEN)
do you know what this might be can I close it?
Unknown User
Unknown Userā€¢3y ago
Message Not Public
Sign In & Join Server To View
Mert Efe
Mert EfeOPā€¢3y ago
ok it was action runner so it needs to stay on can I change my port somehow then for docker? do you change here to 7070? action runner is running in 8080 so i think i need to change port okay 7070:7070 worked let's see if api returns a response
Unknown User
Unknown Userā€¢3y ago
Message Not Public
Sign In & Join Server To View
Mert Efe
Mert EfeOPā€¢3y ago
yeah do i have to change nginx port or something ? hmmhttp://167.99.212.178/flowers/flowers api is online but not returning the resp. 7070:8080 why this is like that? like why not 7070:7070
Unknown User
Unknown Userā€¢3y ago
Message Not Public
Sign In & Join Server To View
Mert Efe
Mert EfeOPā€¢3y ago
ohh should I make my backend in that case 7070 ? the express i mean.
Unknown User
Unknown Userā€¢3y ago
Message Not Public
Sign In & Join Server To View
Mert Efe
Mert EfeOPā€¢3y ago
sorry didn't understand. should my Dockerfile expose and express ports be 8080 still but i should make 7070:8080 to escape collision with other node am I correct?
Unknown User
Unknown Userā€¢3y ago
Message Not Public
Sign In & Join Server To View
Mert Efe
Mert EfeOPā€¢3y ago
thank you bro docker logs shows i'm active
root@zaboplant:~# docker logs api --follow
Server listening on 8080
root@zaboplant:~# docker logs api --follow
Server listening on 8080
but when I make a request i get 500 what could be happening?
Unknown User
Unknown Userā€¢3y ago
Message Not Public
Sign In & Join Server To View
Mert Efe
Mert EfeOPā€¢3y ago
bro it works http://167.99.212.178:7070/flowers/flowers i have to write 7070 port is this expected? ā¤ļø thank you
Unknown User
Unknown Userā€¢3y ago
Message Not Public
Sign In & Join Server To View
Mert Efe
Mert EfeOPā€¢3y ago
hahaha btw just curious u had a clue when u said 7070:8080 like did u use that kind of thing before ? šŸ˜„ seems pretty advanced to me but thanks so much!
Unknown User
Unknown Userā€¢3y ago
Message Not Public
Sign In & Join Server To View
Mert Efe
Mert EfeOPā€¢3y ago
thank you so much is this you btw? are you a backend dev bro? i'm normally full stack a bit front leaning, these are new to me but exciting for sure ! challenging too!
Unknown User
Unknown Userā€¢3y ago
Message Not Public
Sign In & Join Server To View
Mert Efe
Mert EfeOPā€¢3y ago
Yeah šŸ˜„ are you familiar with connecting proxy ips ?
Unknown User
Unknown Userā€¢3y ago
Message Not Public
Sign In & Join Server To View
Mert Efe
Mert EfeOPā€¢3y ago
Bro, If I make my backend express port as 5000, And if I expose container with 8080 then I should be able to reach to it with -p 5000:8080 ? fixed
Want results from more Discord servers?
Add your server