Skip to content
Snippets Groups Projects
Commit f51970b1 authored by Administrator's avatar Administrator
Browse files

Initial commit

parent eb168030
No related branches found
No related tags found
No related merge requests found
Pipeline #396 failed with stage
in 1 second
build-image:
stage: build
before_script:
- docker info
- docker login -u gitlab-ci-token -p "$CI_JOB_TOKEN" "$CI_REGISTRY"
script:
- ./build_image.sh
tags:
- shell
# Adapted from https://github.com/efrecon/docker-s3fs-client/blob/master/Dockerfile
# pinning to current version
FROM alpine:3.13.2 AS build
ARG S3FS_VERSION=v1.89
RUN apk --no-cache add \
ca-certificates \
build-base \
git \
alpine-sdk \
libcurl \
automake \
autoconf \
libxml2-dev \
libressl-dev \
fuse-dev \
curl-dev && \
git clone https://github.com/s3fs-fuse/s3fs-fuse.git && \
cd s3fs-fuse && \
git checkout tags/${S3FS_VERSION} && \
./autogen.sh && \
./configure --prefix=/usr && \
make -j && \
make install
FROM alpine
COPY --from=build /usr/bin/s3fs /usr/bin/s3fs
RUN mkdir -p /projects && \
apk --no-cache add \
ca-certificates \
fuse \
libxml2 \
libcurl \
libgcc \
libstdc++ \
tini && \
s3fs --version
WORKDIR /projects
COPY *.sh /usr/local/bin/
# The default is to perform all system-level mounting as part of the entrypoint
# to then have a command that will keep listing the files under the main share.
# Listing the files will keep the share active and avoid that the remote server
# closes the connection.
ENTRYPOINT [ "tini", "-g", "--", "entrypoint.sh" ]
CMD [ "empty.sh" ]
#!/usr/bin/env bash
set -ex
IMAGE_NAME="$CI_REGISTRY_IMAGE":"$CI_COMMIT_BRANCH"
docker build -t ${IMAGE_NAME} -f Dockerfile .
docker push ${IMAGE_NAME}
exit 0
#!/bin/sh
# Create user directories
mkdir /s3root
s3fs maap-$MAAP_ENVIRONMENT-workspace:/ /s3root -o use_cache=/tmp -o imdsv1only -o iam_role=auto
mkdir -p /s3root/$CHE_WORKSPACE_NAMESPACE
mkdir -p /s3root/shared/$CHE_WORKSPACE_NAMESPACE
umount /s3root
rm -rf /s3root
s3fs maap-$MAAP_ENVIRONMENT-workspace:/$CHE_WORKSPACE_NAMESPACE /my-private-bucket -o use_cache=/tmp -o imdsv1only -o iam_role=auto
s3fs maap-$MAAP_ENVIRONMENT-workspace:/shared /shared-buckets -o ro -o use_cache=/tmp -o imdsv1only -o iam_role=auto
s3fs maap-$MAAP_ENVIRONMENT-workspace:/shared/$CHE_WORKSPACE_NAMESPACE /my-public-bucket -o use_cache=/tmp -o imdsv1only -o iam_role=auto
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment