-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
csm-backup in docker with dotnet #49
Comments
Sorry, but I don't have any Linux and Docker experience. So I don't have the knowledge to directly help you with any permission issues.
SCM Backup uses So for your example, it would execute this:
Does this work in your Docker container? |
@christianspecht thanks for prompt response I tried to reproduce what your code does but in Docker:
So, you were right about issue - it was caused by git and/or docker themself. Will look into this later Thank you! It's very interesting -
So I'd assume it has to do with
|
FYI: someone else got it to work in Docker, see #51 |
Hi there, here is a sample of working FROM alpine:3.13
ARG YQ_VERSION=4.7.1
ARG SCM_FILE=scm-backup-1.5.3.7c34699.zip
ARG DOTNET_FILE=dotnet-runtime-3.1.14-linux-musl-x64.tar.gz
ARG DOTNET_FILE_SHA512=77856f6183ef7ee561fe8510e89148566972ae21e3915242ae4ac7ef987b1aa78cda09bb06fdae96cd03758975dc5eb0e8652dea79b96db327ac5de2a4d41961
ENV SCM_ROOT=/opt/scm-backup
ENV DOTNET_ROOT=/opt/dotnet
ENV PATH=${PATH}:${DOTNET_ROOT}
WORKDIR ${SCM_ROOT}
RUN apk add --no-cache \
# Install deps
bash icu-libs krb5-libs \
libgcc libintl libssl1.1 \
libstdc++ zlib curl git \
# Install dotnet runtime
&& curl -fsL -o ${DOTNET_FILE} https://download.visualstudio.microsoft.com/download/pr/e7f88aae-a10e-4b49-8ccd-31f2df82cf3f/35fb27716a3b7543ef2889f0e4c19949/${DOTNET_FILE} \
&& echo "${DOTNET_FILE_SHA512} ${DOTNET_FILE}" > ${DOTNET_FILE}.sha512 \
&& sha512sum -c ${DOTNET_FILE}.sha512 \
&& mkdir -p ${DOTNET_ROOT} \
&& tar zxf ${DOTNET_FILE} -C ${DOTNET_ROOT} \
# Install scm-backup
&& curl -fsL -o ${SCM_FILE} https://github.com/christianspecht/scm-backup/releases/download/1.5.3/${SCM_FILE} \
&& unzip ${SCM_FILE} \
&& rm -f ${SCM_FILE} ${DOTNET_FILE} ${DOTNET_FILE}.sha512 \
# Install yq (config templating)
&& curl -fSL https://github.com/mikefarah/yq/releases/download/v${YQ_VERSION}/yq_linux_amd64 -o /usr/local/bin/yq \
&& chmod +x /usr/local/bin/yq
COPY entrypoint.sh /usr/local/bin
COPY settings.yml .
RUN chmod +x /usr/local/bin/entrypoint.sh
ENTRYPOINT ["entrypoint.sh"] Very raw #!/usr/bin/env bash
yq e -i '(.sources[] | select(.title == "bitbucket_backup").name) = env(BITBUCKET_TEAM)' settings.yml
yq e -i '(.sources[] | select(.title == "bitbucket_backup").authName) = env(BITBUCKET_USER)' settings.yml
yq e -i '(.sources[] | select(.title == "bitbucket_backup").password) = env(BITBUCKET_PASS)' settings.yml
exec dotnet ScmBackup.dll Sample
Just create all 3 files in a single directory and run docker build . -t scm-backup
docker run -v ${PWD}:/opt/scm-backup/backup -e BITBUCKET_USER=mybbusername -e BITBUCKET_PASS=mybbpassword -e BITBUCKET_TEAM=mybbteam scm-backup |
Closing this for now. I just added a new section to the documentation which lists all Dockerfiles / images that I know of: |
Hello here
I'm trying to get up and running backups on the linux via docker but stumbled upon this issue:
I don't see what is wrong with permissions because if I do
docker exec
in this container I can easily create file:Also,
git clone
inside container works fine as expectedMy Dockerfile:
Use:
The text was updated successfully, but these errors were encountered: