All Projects → NVIDIA → Docker Swift

NVIDIA / Docker Swift

Licence: gpl-2.0
Docker image for Swift all-in-one demo deployment

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Docker Swift

Bitnami Docker Parse
Stars: ✭ 56 (-16.42%)
Mutual labels:  docker-image
Docker Image Builder
标准化组件方式构建Docker镜像。Build a docker image from pieces of standard components.
Stars: ✭ 61 (-8.96%)
Mutual labels:  docker-image
Bitnami Docker Express
Bitnami Express Docker Compose development environment
Stars: ✭ 63 (-5.97%)
Mutual labels:  docker-image
Dokai
Collection of Docker images for ML/DL and video processing projects
Stars: ✭ 58 (-13.43%)
Mutual labels:  docker-image
Docker Laravel Queue Worker
A docker image for working with queues being monitored by supervisor as recommended by laravel.
Stars: ✭ 60 (-10.45%)
Mutual labels:  docker-image
Max Image Caption Generator
IBM Code Model Asset Exchange: Show and Tell Image Caption Generator
Stars: ✭ 62 (-7.46%)
Mutual labels:  docker-image
Fabric Baseimage
Stars: ✭ 53 (-20.9%)
Mutual labels:  docker-image
Poco
Poco will help you to organise and manage Docker, Docker-Compose, Kubernetes, Openshift projects of any complexity using simple YAML config files to shorten the route from finding your project to initialising it in your local environment.
Stars: ✭ 66 (-1.49%)
Mutual labels:  docker-image
Docker Hugo
🐳 Docker Image for Hugo, a fast and flexible static site generator
Stars: ✭ 60 (-10.45%)
Mutual labels:  docker-image
Counter Strike Docker
Docker image for Counter-Strike 1.6 server
Stars: ✭ 63 (-5.97%)
Mutual labels:  docker-image
Fullstaq Ruby Docker
Docker image for Ruby build from Fullstaq based on Debian 9 and Debian 10.
Stars: ✭ 59 (-11.94%)
Mutual labels:  docker-image
Scala Graalvm Docker
Docker images to build and generate native artifacts using GraalVM
Stars: ✭ 60 (-10.45%)
Mutual labels:  docker-image
Docker Magento
🐳 Docker containers with all required Magento dependencies installed available as Apache and CLI
Stars: ✭ 62 (-7.46%)
Mutual labels:  docker-image
Docker Spark Cluster
A Spark cluster setup running on Docker containers
Stars: ✭ 57 (-14.93%)
Mutual labels:  docker-image
Docker Vscode
A Docker Image with Visual Studio Code + Dotnet CLI + NPM + Emacs + More!
Stars: ✭ 64 (-4.48%)
Mutual labels:  docker-image
Socat
Run socat command in alpine container
Stars: ✭ 53 (-20.9%)
Mutual labels:  docker-image
Docker Yourls
📦 Docker Official Image packaging for YOURLS
Stars: ✭ 61 (-8.96%)
Mutual labels:  docker-image
Drone Telegram
Drone plugin for sending Telegram notifications
Stars: ✭ 67 (+0%)
Mutual labels:  docker-image
Dockerfiles
Collection of Dockerfiles
Stars: ✭ 64 (-4.48%)
Mutual labels:  docker-image
Phpipam
phpIPAM Docker image
Stars: ✭ 62 (-7.46%)
Mutual labels:  docker-image

docker-swift

Docker Pulls

Docker image for Swift all-in-one demo deployment

This is an attempt to dockerize the instructions for a Swift All-in-one deployment.

Swift requires xattr to be enabled. With the overlay2 storage driver, Docker supports extended attributes. However, if you're using the older AUFS storage driver, it isn't possible for Swift to use storage within the Docker image. The workaround for this is to mount a volume from a filesystem where xattr is enabled (e.g. ext4 or xfs).

If you'd like the data to be persistent, you should also store it in an external volume.

You can pull the images from the DockerHub registry:

docker pull dockerswiftaio/docker-swift:latest

If you need a specific version of Swift, or would like to pin to a specific version (recommended), you can pull the specific version like this:

docker pull dockerswiftaio/docker-swift:2.24.0

This works:

This uses Docker's storage:

docker pull dockerswiftaio/docker-swift
docker run -P -t dockerswiftaio/docker-swift
curl -v -H 'X-Storage-User: test:tester' -H 'X-Storage-Pass: testing' http://127.0.0.1:<port>/auth/v1.0
curl -v -H 'X-Auth-Token: <token-from-x-auth-token-above>' <url-from-x-storage-url-above>
swift -A http://127.0.0.1:<port>/auth/v1.0 -U test:tester -K testing stat

To persist data, you can replace the docker run command with the following:

docker run -P -v /path/to/data:/swift/nodes/1/node/sdb1 -t dockerswiftaio/docker-swift

If you'd like to replace Swift configuration files, you can also bind mount them. For example:

docker run -P -v /path/to/proxy-server.conf:/etc/swift/proxy-server.conf -t dockerswiftaio/docker-swift

Discover the port by running docker ps, which will give output like this:

CONTAINER ID   IMAGE                                COMMAND                  CREATED         STATUS         PORTS                     NAMES
8f892e66b517   dockerswiftaio/docker-swift:2.24.0   "/bin/bash /swift/bi…"   7 seconds ago   Up 6 seconds   0.0.0.0:49177->8080/tcp   magical_bhaskara

You want the port that is mapped to port 8080 within the Docker image, in this case 49176.

Get an authorization token like this:

curl -v -H 'X-Storage-User: test:tester' -H 'X-Storage-Pass: testing' http://127.0.0.1:<port>/auth/v1.0

Result:

* About to connect() to 127.0.0.1 port 8080 (#0)
*   Trying 127.0.0.1... connected
> GET /auth/v1.0 HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: 127.0.0.1:8080
> Accept: */*
> X-Storage-User: test:tester
> X-Storage-Pass: testing
>
< HTTP/1.1 200 OK
< X-Storage-Url: http://127.0.0.1:8080/v1/AUTH_test
< X-Auth-Token: AUTH_tk246b80e9b72a42e68a76e0ff2aaaf051
< Content-Type: text/html; charset=UTF-8
< X-Storage-Token: AUTH_tk246b80e9b72a42e68a76e0ff2aaaf051
< Content-Length: 0
< Date: Mon, 28 Oct 2013 22:48:51 GMT
<
* Connection #0 to host 127.0.0.1 left intact
* Closing connection #0

To run the demo.sh script, store the X-Storage-Url and X-Auth-Token values in environment variables:

export URL=http://127.0.0.1:8080/v1/AUTH_test
export TOKEN=AUTH_tk246b80e9b72a42e68a76e0ff2aaaf051

You can then run demo.sh, which will execute a series of curl commands to create a container, list various information, put itself into Swift as object "testcontainer/testobject", and retrieve itself again as "retrieved_demo.sh".

Notes

Uses supervisord to keep the image running. To get a shell on the container, you can use:

docker exec -it <container name> /bin/bash

Tail /var/log/syslog to see what it's doing.

Notes on changes from Swift-AIO instructions

  • user and group ids are swift:swift
  • the instructions provide for using a separate partition or a loopback for storage, presumably to allow the storage capacity to be strictly limited. Neither of these was easy for a Docker n00b to implement, so I've just used /swift, with symbolic links in /srv. The storage can be limited at the OS level in the Docker image if it's a concern.
  • the Github sources are cloned to /usr/local/src

License

Copyright (C) 2015 NVIDIA CORPORATION

Copyright (C) 2015-2019 Bounce Storage

Copyright (C) 2013-2015 Peter Binkley @pbinkley

Licensed under the GNU General Public License, Version 2.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].