Commit Graph

64 Commits

Author SHA1 Message Date
Steven Allen
968e70f1e2 fix: downgrade to go 1.13
Go 1.14 has a timer reset deadlock (https://github.com/golang/go/issues/38070).

This also downgrades quic-go until either a go patch release fixes this issue or
a version of quic-go is released that works with go 1.13.
2020-03-29 18:41:47 -07:00
Steven Allen
5d6d289ce8 chore: update golang 2020-03-27 09:37:37 -07:00
Steven Allen
956b8d1e75 feat: update go in docker container
Nice and fresh features & bugs.
2020-02-25 18:57:19 -08:00
Oli Evans
aa3ca14197
feat: pass IPFS_PLUGINS to docker build
- allow IPFS_PLUGINS build-arg to be passed to docker build command
- remove annoying logging from peerlog plugin that appears multiple times in docker logs

usage:

  docker build --build-arg IPFS_PLUGINS="foo bar baz"

License: MIT
Signed-off-by: Oli Evans <oli@tableflip.io>
2020-02-13 14:39:58 +00:00
Steven Allen
7969dbfc06
Merge pull request #6854 from cap10morgan/feature/multi-arch-docker-images
Allow building non-amd64 Docker images
2020-01-30 14:21:55 -08:00
Wes Morgan
78977c56e0
Allow building non-amd64 Docker images 2020-01-29 11:39:19 -07:00
Steven Allen
627b62da36 fix(build): instruct users to use GOTAGS, not GOFLAGS
GOFLAGS will _override_ all the flags. If we just want to set a tag e.g., enable
OpenSSL, we should set GOTAGS=openssl.

fixes https://github.com/ipfs/go-ipfs/issues/6622#issuecomment-576713181
2020-01-21 08:16:29 -08:00
Steven Allen
52c8c37f1c fix(docker): fix maintainer email 2020-01-21 08:08:00 -08:00
Steven Allen
c2fd41c998 fix(docker): fix the start_ipfs permissions
Otherwise, we inherit the permissions from the host machine. These depend on the
host machine's umask.
2020-01-15 17:15:49 -08:00
Steven Allen
ee9b46891b feat(docker): build with openssl by default 2020-01-15 17:15:49 -08:00
Steven Allen
8ed357d053 feat(docker): bump the tini version 2020-01-15 17:15:46 -08:00
Steven Allen
cc25df768e feat(docker): bump the go version 2020-01-15 17:01:47 -08:00
Steven Allen
dba13955e5 chore(build): switch to go 1.13 2019-11-15 05:36:09 -08:00
Jakub Kaczmarzyk
23051b74fb
update maintainer label
The `MAINTAINER` Dockerfile instruction has been deprecated, and the [dockerfile documentation](https://docs.docker.com/engine/reference/builder/#maintainer-deprecated) recommends using `LABEL maintainer="..."`. This commit updates the Dockerfile to use the recommended form.
2019-10-29 11:22:30 -04:00
George Masgras
8f24a12259 copy symlinked libdl.so.2 instead of specific version 2019-09-04 11:32:31 -07:00
Steven Allen
c8c104a17f docker: update the docker image
* Explicitly switch to buster.
* Explicitly set the golang version (and use the latest patch release).
* Explicitly set the busybox version.
* Update the maintainer
2019-08-16 13:26:37 -07:00
hannahhoward
d0ed138246 fix(Dockerfile): Allow ipfs mount in Docker container
fixes #4329

License: MIT
Signed-off-by: hannahhoward <hannah@hannahhoward.net>
2019-05-08 23:35:30 -07:00
Jakub Sztandera
60a43f89da gomod: Update Dockerfile, remove Dockerfile.fast
The main Dockerfile supports dependencies caching now, rendering
Dockerfile.fast useless.

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2019-03-19 21:10:01 +01:00
Hector Sanjuan
9f74e12103
Revert "Really run as non-root user in docker container" 2019-03-03 16:20:54 +00:00
Mykola Nikishov
5b2e305fef Really run as non-root user in docker container
As of now,

    $ docker pull ipfs/go-ipfs
    Using default tag: latest
    latest: Pulling from ipfs/go-ipfs
    Digest: sha256:31cc5713ef3e3e81bf868cbb56c19de2d15d661743d8b6077804dee26e929ac5
    Status: Image is up to date for ipfs/go-ipfs:latest

ipfs daemon will start as root user:

    $ docker run --rm --entrypoint=/bin/sh ipfs/go-ipfs -c whoami
    root

but later on will drop priviledges:

    $ docker logs ipfs/go-ipfs |head -n 1
    Changing user to ipfs

With this change applied, ipfs daemon starts as ipfs user right from
the begining:

    $ docker run --rm --entrypoint=/bin/sh ipfs/go-ipfs -c whoami
    ipfs

License: MIT
Signed-off-by: Mykola Nikishov <mn@mn.com.ua>
2018-12-10 16:25:14 -08:00
Frank Sachsenheim
0b29355220 Dockerfile: Specifies comments on exposed ports
Closes #5610

License: MIT
Signed-off-by: Frank Sachsenheim <funkyfuture@noreply.github.com>
2018-10-23 20:28:32 +02:00
Steven Allen
8b573dc771 switch to go 1.11
Go 1.11 changes the output of `go fmt` slightly so we either need to
all *downgrade* or *upgrade*. Let's upgrade.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-10-08 17:03:20 -07:00
Łukasz Magiera
22a25ef15c switch minimum go version to go 1.10
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
Signed-off-by: Victor Bjelkholm <git@victor.earth>
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-05-16 12:43:20 +01:00
Jeromy Johnson
5012a9d11e Merge pull request #4330 from ipfs/fix/docker-comments
docker: move comments to avoid "empty continuation lines"
2017-10-23 12:29:50 +01:00
Hector Sanjuan
b57539c109 Dockerfiles: do not set gecos field on user add. Set group.
I think this was unintended: useradd -g sets the gecos field to "100".
Probably we meant to use -G to set the ipfs user group.

-G does not take gids, so it needs to be set by name.
The group with gid 100 is "users".

Additionally, since we install the ca-certificates package
(which is already installed), at least we should attempt to update it
to get the latest version of certs.

License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-20 20:59:26 +02:00
Lars Gierth
87408886b2 docker: move comments to avoid "empty continuation lines"
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2017-10-20 16:22:51 +02:00
Lars Gierth
e2a3cd3b66 docker: switch from musl to glibc
The Dockerfile now has two stages: build and assembly.
This allows for a full-fledged debian build container,
while still resulting in a super-thin busybox image.

License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2017-09-13 15:49:34 +02:00
Lars Gierth
edbb42b712 docker: expose port 8081 for /ws listener
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2017-06-02 03:42:36 +02:00
kpcyrd
3c96b09ae7 docker: Automatically fix permissions
This patch is delaying the point where permissions are dropped into the `start_ipfs` script. This way, instead of exiting on permission issues, we can fix them on our own inside the script, then drop privileges and continue doing ipfs specific stuff with the correct user.

I've removed the `chmod 0777` step from the readme since it's not needed anymore.

License: MIT
Signed-off-by: kpcyrd <git@rxv.cc>
2017-03-03 21:10:02 +01:00
kpcyrd
3799bcfc2e Docker: Automatically migrate repo
This keeps docker containers from entering a crashloop on new image versions

License: MIT
Signed-off-by: kpcyrd <git@rxv.cc>
2017-02-12 21:10:28 +00:00
kpcyrd
77e4c64ac0 Dockerfile: Deprecate implicit daemon argument
After the discussion in https://github.com/ipfs/go-ipfs/pull/3573 this patch prints a deprecation warning if:

1) the image has been executed with additional arguments
2) the first argument isn't daemon

This way people are able to migrate to the new syntax without any breaking changes.

License: MIT
Signed-off-by: kpcyrd <git@rxv.cc>
2017-02-12 20:53:19 +00:00
Lars Gierth
b84ca68fa3 docker: switch to alpine dev channel, for go1.7
Go 1.7 funnily demands gcc for installing gx.

License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2016-08-26 01:44:32 +02:00
Lars Gierth
8cdf819af9 docker: remove go version constraint
There's only ever one version of a given package
per Alpine release, so GO_VERSION is superfluous
and only breaks the build if the go packages is updated.

License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2016-07-01 16:33:16 +02:00
Lars Gierth
a04570df73 docker: update to go 1.6.2 and alpine 3.4
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2016-06-24 02:24:20 +02:00
Lars Gierth
00ae31cbdd docker: make dockerfile differences more obvious
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2016-06-03 02:12:31 +02:00
Lars Gierth
0eed330ec2 docker: simplify git ref resolution, thanks @chriscool
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2016-05-24 00:27:02 +02:00
Lars Gierth
6b94fdecd6 docker: fix CurrentCommit discovery
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2016-05-20 02:40:41 +02:00
Lars Gierth
e933a57976 docker: allow IPFS_LOGGING to be passed
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2016-04-28 20:57:02 +02:00
Christian Couder
6083f61d05 Dockerfile: use go version 1.5.4-r0
This error recently appeared when building the Dockerfile:

ERROR: unsatisfiable constraints:
  go-1.5.4-r0:
    breaks: world[go=1.5.3-r0]

It looks that now upstream requires go 1.5.4-r0 not 1.5.3-r0.

License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2016-04-27 07:52:05 +02:00
Lars Gierth
ce0d62dca3 docker: save image space by excluding .git/
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2016-02-05 04:03:30 +01:00
Lars Gierth
81c8cffee9 Rework the Dockerfile
- Have two Dockerfiles doing essentially the same,
  but optimized for build time (for tests)
  and image size (for Docker Hub)
- Fetch gx dependencies
- Expose port 4002 for utp
- Specify go version, currently 1.5.3-r0
- Create ephemeral fs-repo if none is mounted
- Have t0300-docker-image actually test IPFS, not just an echo
- Make everything a bit less hardcoded
- Remove dead shacheck

License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2016-02-04 10:46:26 -08:00
Knut Ahlers
fd5ddcb71b Build ipfs cmd inside docker container
License: MIT
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2016-01-17 21:27:17 +01:00
Christian Kniep
a226704b2d change Dockerfile order to create VOLUME under user ipfs
License: MIT
Signed-off-by: Christian Kniep <christian@qnib.org>
2016-01-10 20:19:23 +01:00
Knut Ahlers
a245a27c17 Migrated Dockerfile to use alpine linux
License: MIT Signed-off-by: Knut Ahlers <knut@ahlers.me>
2015-07-15 13:07:34 +02:00
Knut Ahlers
3534b039f7 Improve Dockerfile
* Added VOLUME to enable users to keep a state of the repo outside the container
* Added ipfs user to let ipfs run as a normal user and not as root
* Set IPFS_PATH to push IPFS to use the exposed dir
* Improved start script to be more verbose about errors
2015-04-23 23:54:32 +02:00
Ho-Sheng Hsiao
bf22aeec0a Reorged imports from jbenet/go-ipfs to ipfs/go-ipfs
- Modified Godeps/Godeps.json by hand
- [TEST] Updated welcome docs hash to sharness
- [TEST] Updated contact doc
- [TEST] disabled breaking test (t0080-repo refs local)
2015-03-31 12:52:25 -07:00
Knut Ahlers
ab28018f8c Moved the container startup script to bin 2015-02-23 00:16:38 +01:00
Knut Ahlers
382697004b Removed 4002/udp for now, fixed start commands 2015-02-22 23:34:27 +01:00
Knut Ahlers
0eef12a07b Added boot script to listen on 0.0.0.0 2015-02-22 23:27:25 +01:00
Knut Ahlers
f6e3730908 HTTP transport is listening on port 8080 by default 2015-02-22 23:02:05 +01:00