summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorThiago da Silva <thiagodasilva@gmail.com>2019-05-03 16:52:53 -0400
committerThiago da Silva <thiagodasilva@gmail.com>2019-05-07 15:44:00 -0400
commit37e257913c161905f96cde8e783aaa501a4e419d (patch)
tree71be149d689f5ea3a70d8344c14e46800a7c297b /Dockerfile
parentce1ba6a51d27271be9cdf9b5915b39bab5498948 (diff)
downloadswift-37e257913c161905f96cde8e783aaa501a4e419d.tar.gz
Add Dockerfile to build a SAIO container image
Added Dockerfile and configuration files under the new `docker` directory to build a Swift All in One container image. The primary goal of this container image is to provide application developers with a Swift/S3 endpoint that can be tested against during the development cycle. Added Zuul jobs to build docker container Change-Id: Ib10975a1862a4fa8c4eeaba139837cf1f22b272a
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile76
1 files changed, 76 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 000000000..00b16b434
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,76 @@
+################################################
+#
+# Alpine 3.7 Swift-All-In-One
+#
+################################################
+
+FROM alpine:3.7
+MAINTAINER Openstack Swift
+
+ENV S6_LOGGING 1
+ENV S6_VERSION 1.21.4.0
+ENV SOCKLOG_VERSION 3.0.1-1
+ENV ARCH amd64
+ENV BUILD_DIR "/tmp"
+ENV ENV="/etc/profile"
+
+#COPY docker/install_scripts /install_scripts
+COPY . /opt/swift
+
+ADD https://github.com/just-containers/s6-overlay/releases/download/v$S6_VERSION/s6-overlay-$ARCH.tar.gz /tmp/
+ADD https://github.com/just-containers/s6-overlay/releases/download/v$S6_VERSION/s6-overlay-$ARCH.tar.gz.sig /tmp/
+ADD https://github.com/just-containers/socklog-overlay/releases/download/v$SOCKLOG_VERSION/socklog-overlay-$ARCH.tar.gz /tmp/
+
+RUN mkdir /etc/swift && \
+ echo && \
+ echo && \
+ echo && \
+ echo "================ starting swift_needs ===================" && \
+ /opt/swift/docker/install_scripts/00_swift_needs.sh && \
+ echo && \
+ echo && \
+ echo && \
+ echo "================ starting apk_install_prereqs ===================" && \
+ /opt/swift/docker/install_scripts/10_apk_install_prereqs.sh && \
+ echo && \
+ echo && \
+ echo && \
+ echo "================ compiling liberasurecode ===================" && \
+ /opt/swift/docker/install_scripts/17_compile_liberasurecode.sh && \
+ echo && \
+ echo && \
+ echo && \
+ echo "================ starting swift_install ===================" && \
+ /opt/swift/docker/install_scripts/50_swift_install.sh && \
+ echo && \
+ echo && \
+ echo && \
+ echo "================ installing s6-overlay ===================" && \
+ curl https://keybase.io/justcontainers/key.asc | gpg --import && \
+ gpg --verify /tmp/s6-overlay-$ARCH.tar.gz.sig /tmp/s6-overlay-$ARCH.tar.gz && \
+ gunzip -c /tmp/s6-overlay-$ARCH.tar.gz | tar -xf - -C / && \
+ gunzip -c /tmp/socklog-overlay-amd64.tar.gz | tar -xf - -C / && \
+ rm -rf /tmp/s6-overlay* && \
+ rm -rf /tmp/socklog-overlay* && \
+ echo && \
+ echo && \
+ echo && \
+ echo "================ starting pip_uninstall_dev ===================" && \
+ /opt/swift/docker/install_scripts/60_pip_uninstall_dev.sh && \
+ echo && \
+ echo && \
+ echo && \
+ echo "================ starting apk_uninstall_dev ===================" && \
+ /opt/swift/docker/install_scripts/99_apk_uninstall_dev.sh && \
+ echo && \
+ echo && \
+ echo && \
+ echo "================ clean up ===================" && \
+ echo "TODO: cleanup"
+ #rm -rf /opt/swift
+
+
+# Add Swift required configuration files
+COPY docker/rootfs /
+
+ENTRYPOINT ["/init"]