Discussion:
FreeBSD and Docker
o***@hushmail.com
2015-06-10 11:11:35 UTC
Permalink
Hi!

Attempting to install the Discourse discussion forum (https://github.com/discourse/discourse) on my DigitalOcean FreeBSD VPS. Discourse requires Docker, however nothing happens when I try `wget -qO- https://get.docker.com/ | sh` (https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md).

What am I doing wrong?

Thanks!

O.D.
Mayuresh Kathe
2015-06-10 11:58:56 UTC
Permalink
Post by o***@hushmail.com
Hi!
Attempting to install the Discourse discussion forum
(https://github.com/discourse/discourse) on my DigitalOcean FreeBSD
VPS. Discourse requires Docker, however nothing happens when I try
`wget -qO- https://get.docker.com/ | sh`
(https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md).
What am I doing wrong?
did you try getting that file first?
as it is! maybe you could issue; wget https://get.docker.com/
once downloaded, try running the file; sh <filename>

~mayuresh
Joe Shevland
2015-06-10 13:13:24 UTC
Permalink
Postgres, Redis and Ruby are available though, so I don't think it'd be impossible to get the RoR side of things working for Discourse.
Post by o***@hushmail.com
Hi!
Attempting to install the Discourse discussion forum
(https://github.com/discourse/discourse) on my DigitalOcean
FreeBSD VPS. Discourse requires Docker, however nothing happens
when I try `wget -qO- https://get.docker.com/ | sh`
(https://github.com/discourse/discourse/blob/master/docs/INSTALL-
cloud.md).
What am I doing wrong?
Thanks!
O.D.
_______________________________________________
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-
o***@hushmail.com
2015-06-13 13:01:44 UTC
Permalink
Hi!
Post by Joe Shevland
Postgres, Redis and Ruby are available though, so I don't think
it'd be impossible to get the RoR side of things working for
Discourse.
True that. I managed to install the bundle but now during migration https://github.com/discourse/discourse/blob/master/db/migrate/20120921162512_add_meta_data_to_forum_threads.rb gives me:

== 20120921162512 AddMetaDataToForumThreads: migrating ========================
-- execute("CREATE EXTENSION IF NOT EXISTS hstore")
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

PG::InvalidParameterValue: ERROR: version to install must be specified
: CREATE EXTENSION IF NOT EXISTS hstore/usr/home/www/myapp/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.10/lib/active_record/connection_adapters/postgresql/database_statements.rb:128:in `async_exec'
/usr/home/www/myapp/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.10/lib/active_record/connection_adapters/postgresql/database_statements.rb:128:in `block in execute'

Docker or not, it's still odd that the migration should fail like this. I'm using PostgreSQL 9.4.

O.D.
Post by Joe Shevland
Post by o***@hushmail.com
Hi!
Attempting to install the Discourse discussion forum
(https://github.com/discourse/discourse) on my DigitalOcean
FreeBSD VPS. Discourse requires Docker, however nothing happens
when I try `wget -qO- https://get.docker.com/ | sh`
(https://github.com/discourse/discourse/blob/master/docs/INSTALL-
cloud.md).
What am I doing wrong?
Thanks!
O.D.
_______________________________________________
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-
_______________________________________________
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-
o***@hushmail.com
2015-06-13 14:04:26 UTC
Permalink
Hello again,

Thanks to Edho Arief from the OpenBSD mailinglists it appears I was simply missing the postgresql-contrib package.

Many thanks!

O.D.
Hi!
On 10. juni 2015 at 1:13 PM, "Joe Shevland"
Post by Joe Shevland
Postgres, Redis and Ruby are available though, so I don't think
it'd be impossible to get the RoR side of things working for
Discourse.
True that. I managed to install the bundle but now during
migration
https://github.com/discourse/discourse/blob/master/db/migrate/20120
== 20120921162512 AddMetaDataToForumThreads: migrating
========================
-- execute("CREATE EXTENSION IF NOT EXISTS hstore")
rake aborted!
StandardError: An error has occurred, this and all later
PG::InvalidParameterValue: ERROR: version to install must be
specified
: CREATE EXTENSION IF NOT EXISTS
hstore/usr/home/www/myapp/vendor/bundle/ruby/2.2.0/gems/activerecor
d-
4.1.10/lib/active_record/connection_adapters/postgresql/database_st
atements.rb:128:in `async_exec'
/usr/home/www/myapp/vendor/bundle/ruby/2.2.0/gems/activerecord-
4.1.10/lib/active_record/connection_adapters/postgresql/database_st
atements.rb:128:in `block in execute'
Docker or not, it's still odd that the migration should fail like
this. I'm using PostgreSQL 9.4.
O.D.
Post by Joe Shevland
Post by o***@hushmail.com
Hi!
Attempting to install the Discourse discussion forum
(https://github.com/discourse/discourse) on my DigitalOcean
FreeBSD VPS. Discourse requires Docker, however nothing happens
when I try `wget -qO- https://get.docker.com/ | sh`
(https://github.com/discourse/discourse/blob/master/docs/INSTALL-
cloud.md).
What am I doing wrong?
Thanks!
O.D.
_______________________________________________
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-
_______________________________________________
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-
_______________________________________________
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-
Joe Shevland
2015-06-10 13:05:13 UTC
Permalink
I'd go for a Linux environment if I was going to use Docker.

Aside from that, in general I break it down into steps first when trying to debug a problem. Remove the -q for a start to suppress warnings. The wget fails because of an invalid certificate on the site, try:

$ cd /tmp
$ wget --no-check-certificate https://get.docker.com -O temp.sh

That'll get you the install script in /tmp/temp.sh.

But the script deliberately looks for linux variants and will abort when you run it on freebsd... my understanding was Docker relies on Linux kernalisms fairly heavily (I don't know how far you get with linux compat in freebsd).
Post by o***@hushmail.com
Hi!
Attempting to install the Discourse discussion forum
(https://github.com/discourse/discourse) on my DigitalOcean
FreeBSD VPS. Discourse requires Docker, however nothing happens
when I try `wget -qO- https://get.docker.com/ | sh`
(https://github.com/discourse/discourse/blob/master/docs/INSTALL-
cloud.md).
What am I doing wrong?
Thanks!
O.D.
_______________________________________________
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-
Jason Cox
2015-06-10 14:29:09 UTC
Permalink
What are you doing wrong? You are trying to run docker on FreeBSD. Docker
is a containerization technology built for Linux. It uses LXC (which is
Linux Containers) for older Kernels or docker specific bits which are now
part of the modern Linux kernel 3.10+. Docker is basically FreeBSD Jails,
with a few more features and a lot more security issues. Stay away from
docker for a while till they fix all the security issues in it or look at
Rocket from the CoreOS team.

I have not looked into Discourse, but any application that requires Docker
is not worth using at this point. I am sure there must be a way to install
it without using Docker. You can get hints of how someone gets apps working
inside a Docker container by looking at the DockerFile if you go looking at
https://registry.hub.docker.com. This is a build file for a containers. If
you just cannot get Discourse working on FreeBSD, then by all means switch
to a Linux install instead. Make sure it is not centos as it will not have
the update Kernel drivers for better Docker support.
Post by o***@hushmail.com
Hi!
Attempting to install the Discourse discussion forum (
https://github.com/discourse/discourse) on my DigitalOcean FreeBSD VPS.
Discourse requires Docker, however nothing happens when I try `wget -qO-
https://get.docker.com/ | sh` (
https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md).
What am I doing wrong?
Thanks!
O.D.
_______________________________________________
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "
--
Jason Cox
Polytropon
2015-06-10 14:52:44 UTC
Permalink
Post by Jason Cox
What are you doing wrong? You are trying to run docker on FreeBSD. Docker
is a containerization technology built for Linux. It uses LXC (which is
Linux Containers) for older Kernels or docker specific bits which are now
part of the modern Linux kernel 3.10+.
It requires too many Linuxisms which aren't part of FreeBSD's
Linux ABI, so expecting Docker to work on FreeBSD is somehow
wrong.
Post by Jason Cox
Docker is basically FreeBSD Jails,
with a few more features and a lot more security issues.
It's surely possible to run a "jail equivalent" of the Docker
application package in question (here: Discourse).
Post by Jason Cox
I have not looked into Discourse, but any application that requires Docker
is not worth using at this point.
Discourse is not exactly _requiring_ Docker - there has been
a prepackaged Docker "instance" of all the components you need
to run Discourse, not more, not less. It should be possible to
run Discourse the "traditional" way - using native FreeBSD
technology.
Post by Jason Cox
If
you just cannot get Discourse working on FreeBSD, then by all means switch
to a Linux install instead. Make sure it is not centos as it will not have
the update Kernel drivers for better Docker support.
That is the final advice. :-)

Docker is for Linux, Jails is for FreeBSD. It's somewhat comparable
to a "pre-packaged VM image", more or less (probably less).

Oh, and doing things like

# wget http://getsomething.example.com | sudo bash

is definitely _not_ the way you want to install software on FreeBSD.
It rather seems to be a new Linuxism that has emerged during the
recent years. :-)
--
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
Maxim V Filimonov
2015-06-10 19:38:33 UTC
Permalink
Post by Polytropon
Post by Jason Cox
What are you doing wrong? You are trying to run docker on FreeBSD. Docker
is a containerization technology built for Linux. It uses LXC (which is
Linux Containers) for older Kernels or docker specific bits which are now
part of the modern Linux kernel 3.10+.
It requires too many Linuxisms which aren't part of FreeBSD's
Linux ABI, so expecting Docker to work on FreeBSD is somehow
wrong.
Some guy tried to port Docker on FreeBSD, and even got it working IIRC.
Post by Polytropon
Oh, and doing things like
# wget http://getsomething.example.com | sudo bash
is definitely _not_ the way you want to install software on FreeBSD.
It rather seems to be a new Linuxism that has emerged during the
recent years. :-)
That's not a Linuxism; in fact, that's a "hipsterism". But that's another
question.
--
wbr, Maxim Filimonov <***@bein.link>
Polytropon
2015-06-11 10:54:14 UTC
Permalink
Post by Maxim V Filimonov
Post by Polytropon
Post by Jason Cox
What are you doing wrong? You are trying to run docker on FreeBSD. Docker
is a containerization technology built for Linux. It uses LXC (which is
Linux Containers) for older Kernels or docker specific bits which are now
part of the modern Linux kernel 3.10+.
It requires too many Linuxisms which aren't part of FreeBSD's
Linux ABI, so expecting Docker to work on FreeBSD is somehow
wrong.
Some guy tried to port Docker on FreeBSD, and even got it working IIRC.
Well, I wouldn't say it's entirely impossible to get a Docker
implementation running on FreeBSD, but probably it won't work
1:1 with all imaginable software - I conclude this from the
concept of being able to run Linux applications on FreeBSD
using our Linux ABI, which works for _many_ applications, but
not for _all_ of them, especially not for those relying on
Linux kernel mechanisms that the ABI doesn't provide a proper
"translation" for. In those cases it's probably easier to use
native FreeBSD solutions: install the ported application into
a Jail. Yes, I know, Docker is much more than Jail in terms
of functionality...

Maybe related:

Erich Schubert:
The sad state of sysadmin in the age of containers

http://www.vitavonni.de/blog/201503/2015031201-the-sad-state-of-sysadmin-in-the-age-of-containers.html
Post by Maxim V Filimonov
Post by Polytropon
Oh, and doing things like
# wget http://getsomething.example.com | sudo bash
is definitely _not_ the way you want to install software on FreeBSD.
It rather seems to be a new Linuxism that has emerged during the
recent years. :-)
That's not a Linuxism; in fact, that's a "hipsterism".
Oh, that's why I see this on Mac OS X related software so often! :-)
Post by Maxim V Filimonov
But that's another
question.
Where the only answer is "more beer". :-)
--
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
William A. Mahaffey III
2015-06-11 13:10:03 UTC
Permalink
Post by Polytropon
Well, I wouldn't say it's entirely impossible to get a Docker
implementation running on FreeBSD, but probably it won't work
1:1 with all imaginable software - I conclude this from the
concept of being able to run Linux applications on FreeBSD
using our Linux ABI, which works for_many_ applications, but
not for_all_ of them, especially not for those relying on
Linux kernel mechanisms that the ABI doesn't provide a proper
"translation" for. In those cases it's probably easier to use
native FreeBSD solutions: install the ported application into
a Jail. Yes, I know, Docker is much more than Jail in terms
of functionality...
The sad state of sysadmin in the age of containers
http://www.vitavonni.de/blog/201503/2015031201-the-sad-state-of-sysadmin-in-the-age-of-containers.html
Hmmmmm .... interesting read. One of the reasons I am migrating to *BSD
is the presumed absence of malevolent gov't involvement (*cough* SELinux
*cough*), I thought the BSD's were mostly/entirely free from such, no ?
--
William A. Mahaffey III

----------------------------------------------------------------------

"The M1 Garand is without doubt the finest implement of war
ever devised by man."
-- Gen. George S. Patton Jr.
Matthew Seaman
2015-06-11 14:03:36 UTC
Permalink
Post by William A. Mahaffey III
Hmmmmm .... interesting read. One of the reasons I am migrating to *BSD
is the presumed absence of malevolent gov't involvement (*cough* SELinux
*cough*), I thought the BSD's were mostly/entirely free from such, no ?
Pretty sure that there aren't any NSA agents in deep cover who have
managed to become FreeBSD committers -- not that I have any way of
telling for sure of course.

Certainly FreeBSD relies on openness as the best guarantee that the OS
we're shipping is free from backdoors, trojans and the like. You've got
access to the source code and the build system so you can (in principle)
review everything you build and dyke out anything you don't like. Of
course, it's a tall order to expect everyone to have the skills to be
able to do that. Consequently, internally we're strongly advocating a
culture of routine code-review before making any commits, but
particularly to any sensitive areas of the kernel.

Cheers,

Matthew
Valeri Galtsev
2015-06-11 14:19:04 UTC
Permalink
Post by Matthew Seaman
Post by William A. Mahaffey III
Hmmmmm .... interesting read. One of the reasons I am migrating to *BSD
is the presumed absence of malevolent gov't involvement (*cough* SELinux
*cough*), I thought the BSD's were mostly/entirely free from such, no ?
Pretty sure that there aren't any NSA agents in deep cover who have
managed to become FreeBSD committers -- not that I have any way of
telling for sure of course.
To the contrary to OpenBSD which allegedly had that sort of trouble:

http://slashdot.org/story/10/12/15/004235/FBI-Alleged-To-Have-Backdoored-OpenBSDs-IPSEC-Stack

Well, I didn't say had, I said allegedly had...

Valeri
Post by Matthew Seaman
Certainly FreeBSD relies on openness as the best guarantee that the OS
we're shipping is free from backdoors, trojans and the like. You've got
access to the source code and the build system so you can (in principle)
review everything you build and dyke out anything you don't like. Of
course, it's a tall order to expect everyone to have the skills to be
able to do that. Consequently, internally we're strongly advocating a
culture of routine code-review before making any commits, but
particularly to any sensitive areas of the kernel.
Cheers,
Matthew
++++++++++++++++++++++++++++++++++++++++
Valeri Galtsev
Sr System Administrator
Department of Astronomy and Astrophysics
Kavli Institute for Cosmological Physics
University of Chicago
Phone: 773-702-4247
++++++++++++++++++++++++++++++++++++++++
o***@hushmail.com
2015-06-10 23:47:43 UTC
Permalink
Hello everyone!

Thanks a lot for your input.

Any chance I could use something like overlayfs / zfs like the author claims?

https://meta.discourse.org/t/is-there-any-way-to-install-discourse-without-docker/16977

Do sign up and give your feedback. There used to be a FreeBSD thread @ meta.discourse.org but it just got deleted.

Many thanks!

O.D.
Post by Jason Cox
Post by Jason Cox
What are you doing wrong? You are trying to run docker on
FreeBSD. Docker
Post by Jason Cox
is a containerization technology built for Linux. It uses LXC
(which is
Post by Jason Cox
Linux Containers) for older Kernels or docker specific bits
which are now
Post by Jason Cox
part of the modern Linux kernel 3.10+.
It requires too many Linuxisms which aren't part of FreeBSD's
Linux ABI, so expecting Docker to work on FreeBSD is somehow
wrong.
Post by Jason Cox
Docker is basically FreeBSD Jails,
with a few more features and a lot more security issues.
It's surely possible to run a "jail equivalent" of the Docker
application package in question (here: Discourse).
Post by Jason Cox
I have not looked into Discourse, but any application that
requires Docker
Post by Jason Cox
is not worth using at this point.
Discourse is not exactly _requiring_ Docker - there has been
a prepackaged Docker "instance" of all the components you need
to run Discourse, not more, not less. It should be possible to
run Discourse the "traditional" way - using native FreeBSD
technology.
Post by Jason Cox
If
you just cannot get Discourse working on FreeBSD, then by all
means switch
Post by Jason Cox
to a Linux install instead. Make sure it is not centos as it
will not have
Post by Jason Cox
the update Kernel drivers for better Docker support.
That is the final advice. :-)
Docker is for Linux, Jails is for FreeBSD. It's somewhat comparable
to a "pre-packaged VM image", more or less (probably less).
Oh, and doing things like
# wget http://getsomething.example.com | sudo bash
is definitely _not_ the way you want to install software on
FreeBSD.
It rather seems to be a new Linuxism that has emerged during the
recent years. :-)
--
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
Outback Dingo
2015-06-10 23:51:19 UTC
Permalink
Post by o***@hushmail.com
Hello everyone!
Thanks a lot for your input.
Any chance I could use something like overlayfs / zfs like the author claims?
https://meta.discourse.org/t/is-there-any-way-to-install-discourse-without-docker/16977
meta.discourse.org but it just got deleted.
Many thanks!
You might want to look at iocage, or jetpack

https://github.com/3ofcoins/jetpack
https://github.com/iocage/iocage
https://github.com/pr1ntf/iohyve
Post by o***@hushmail.com
O.D.
Post by Jason Cox
Post by Jason Cox
What are you doing wrong? You are trying to run docker on
FreeBSD. Docker
Post by Jason Cox
is a containerization technology built for Linux. It uses LXC
(which is
Post by Jason Cox
Linux Containers) for older Kernels or docker specific bits
which are now
Post by Jason Cox
part of the modern Linux kernel 3.10+.
It requires too many Linuxisms which aren't part of FreeBSD's
Linux ABI, so expecting Docker to work on FreeBSD is somehow
wrong.
Post by Jason Cox
Docker is basically FreeBSD Jails,
with a few more features and a lot more security issues.
It's surely possible to run a "jail equivalent" of the Docker
application package in question (here: Discourse).
Post by Jason Cox
I have not looked into Discourse, but any application that
requires Docker
Post by Jason Cox
is not worth using at this point.
Discourse is not exactly _requiring_ Docker - there has been
a prepackaged Docker "instance" of all the components you need
to run Discourse, not more, not less. It should be possible to
run Discourse the "traditional" way - using native FreeBSD
technology.
Post by Jason Cox
If
you just cannot get Discourse working on FreeBSD, then by all
means switch
Post by Jason Cox
to a Linux install instead. Make sure it is not centos as it
will not have
Post by Jason Cox
the update Kernel drivers for better Docker support.
That is the final advice. :-)
Docker is for Linux, Jails is for FreeBSD. It's somewhat comparable
to a "pre-packaged VM image", more or less (probably less).
Oh, and doing things like
# wget http://getsomething.example.com | sudo bash
is definitely _not_ the way you want to install software on
FreeBSD.
It rather seems to be a new Linuxism that has emerged during the
recent years. :-)
--
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
_______________________________________________
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "
Shane Ambler
2015-06-11 03:10:27 UTC
Permalink
Post by Outback Dingo
Post by o***@hushmail.com
Hello everyone!
Thanks a lot for your input.
Any chance I could use something like overlayfs / zfs like the author claims?
https://meta.discourse.org/t/is-there-any-way-to-install-discourse-without-docker/16977
meta.discourse.org but it just got deleted.
Many thanks!
You might want to look at iocage, or jetpack
https://github.com/3ofcoins/jetpack
https://github.com/iocage/iocage
https://github.com/pr1ntf/iohyve
I haven't looked at those but zocker is an attempt at a docker style
functionality on freebsd -
https://github.com/toddnni/zocker

I would start with the discourse source and create a port for it
https://github.com/discourse/discourse
--
FreeBSD - the place to B...Software Developing

Shane Ambler
Polytropon
2015-07-19 10:32:46 UTC
Permalink
Re-visiting some older context...
Post by o***@hushmail.com
Hi!
Attempting to install the Discourse discussion forum (https://github.com/discourse/discourse) on my DigitalOcean FreeBSD VPS. Discourse requires Docker, however nothing happens when I try `wget -qO- https://get.docker.com/ | sh` (https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md).
What am I doing wrong?
Here:

https://wiki.freebsd.org/Docker

But please note: "Docker on FreeBSD should be considered experimental.
Limitations of the 64bit Linux compatibility subsystem will impact
some Linux ABI containers and your testing and feedback is appreciated
to help resolve any such issues."

However, a good start. Maybe it already works for you sufficiently well.
--
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
William A. Mahaffey III
2015-07-19 13:58:04 UTC
Permalink
Post by Polytropon
Re-visiting some older context...
Post by o***@hushmail.com
Hi!
Attempting to install the Discourse discussion forum (https://github.com/discourse/discourse) on my DigitalOcean FreeBSD VPS. Discourse requires Docker, however nothing happens when I try `wget -qO- https://get.docker.com/ | sh` (https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md).
What am I doing wrong?
https://wiki.freebsd.org/Docker
But please note: "Docker on FreeBSD should be considered experimental.
Limitations of the 64bit Linux compatibility subsystem will impact
some Linux ABI containers and your testing and feedback is appreciated
to help resolve any such issues."
However, a good start. Maybe it already works for you sufficiently well.
I also inquired about docker a while back (last fall some time), mostly
out of curiosity. I notice it is only available for 10.1 & higher, &
only ZFS. Any polans for 9.3R, & maybe non-ZFS :-) ?
--
William A. Mahaffey III

----------------------------------------------------------------------

"The M1 Garand is without doubt the finest implement of war
ever devised by man."
-- Gen. George S. Patton Jr.
Loading...