这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@alessio
Copy link
Contributor

@alessio alessio commented Feb 10, 2015

No description provided.

- Use docker ps to filter containers by status to avoid building
  such a long pipe.
dokku Outdated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why the sudo here? I think you can remove it.
Be careful, when there is no image to delete, you will have an error (not shown here, be the exit status will not be 0)
I use this in one of my script:

remove exited containers

exited_containers=$(docker ps -a -q -f status=exited)
[[ -z "$exited_containers" ]] || docker rm $exited_containers &> /dev/null &

remove dangling images

dangling_images=$(docker images -q -f dangling=true)
[[ -z "$dangling_images" ]] || docker rmi $dangling_images &> /dev/null &

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed the sudo thing, was just cruft leftover.

Be careful, when there is no image to delete, you will have an error

The same would happen with the old version too. BTW, your 2-liners look fine to me.

dokku Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On Tue, Feb 10, 2015 at 2:14 PM, Michael Hobbs notifications@github.com wrote:

In dokku:

@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+7#!/usr/bin/env bash

Typo?

Yep

Alessio Treglia | www.alessiotreglia.com
Debian Developer | alessio@debian.org
Ubuntu Core Developer | quadrispro@ubuntu.com
0416 0004 A827 6E40 BB98 90FB E8A4 8AE5 311D 765A

@michaelshobbs
Copy link
Member

Would be great to have a unit test for cleanup.

@josegonzalez
Copy link
Member

@alessio bump for unit test :)

@josegonzalez
Copy link
Member

@michaelshobbs Do these tests look good to you?

@josegonzalez
Copy link
Member

Hmm I wonder why tests didn't trigger here...

@michaelshobbs
Copy link
Member

👍 on the tests. I think @alessio will need to follow his fork on CircleCI to make the tests run.

@josegonzalez
Copy link
Member

@progrium Can you turn on pull request support for dokku? This is the message I got from CircleCI support:

We don't enable pull requests from forks by default because that can sometimes introduce the risk of exposing private credentials depending on how people use Circle. You can allow PRs from forks to be built by turning on "Project fork pull requests" here: https://circleci.com/gh/progrium/dokku/edit#experimental

@progrium
Copy link
Contributor

Mmmmm... I'd really like to avoid it. Might want to put secrets on CircleCI
and this would let anybody get them.

On Thu, Feb 19, 2015 at 12:52 PM, Jose Diaz-Gonzalez <
notifications@github.com> wrote:

@progrium https://github.com/progrium Can you turn on pull request
support for dokku? This is the message I got from CircleCI support:

We don't enable pull requests from forks by default because that can
sometimes introduce the risk of exposing private credentials depending on
how people use Circle. You can allow PRs from forks to be built by turning
on "Project fork pull requests" here:
https://circleci.com/gh/progrium/dokku/edit#experimental


Reply to this email directly or view it on GitHub
#967 (comment).

Jeff Lindsay
http://progrium.com

@josegonzalez
Copy link
Member

We don't currently have secrets - feel free to correct me @michaelshobbs - and I don't think our testing infra needs them anymore (the old travis stuff did).

We can always disable if we ever do.

@progrium
Copy link
Contributor

I can think of a time in the not so distant future when we might. And I
don't want to accidentally forget to disable. But I guess that's a hard
case to make you care about since it would be on me anyway. Did we have PR
testing before?

On Thu, Feb 19, 2015 at 1:23 PM, Jose Diaz-Gonzalez <
notifications@github.com> wrote:

We don't currently have secrets - feel free to correct me @michaelshobbs
https://github.com/michaelshobbs - and I don't think our testing infra
needs them anymore (the old travis stuff did).

We can always disable if we ever do.


Reply to this email directly or view it on GitHub
#967 (comment).

Jeff Lindsay
http://progrium.com

@josegonzalez
Copy link
Member

I guess it was just PRs from @michaelshobbs and myself.

Maybe its just me, but the value of having contributors write tests decrease if they don't get those tests run. And having them turn on an extra knob increases friction to contributing, so I'm torn.

Is there an example where we'd want to have secrets in our circleci setup?

josegonzalez added a commit that referenced this pull request Feb 19, 2015
Really clean-up containers and images a-la-Docker
@josegonzalez josegonzalez merged commit 0e6c978 into dokku:master Feb 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants