Comments (6)
@pjutard if you tweak the Jenkins Dockerfile a little, Jenkins will work fine:
docker volume create -d "cloudstor:azure" jenkins-data
docker service create --name jenkins -p 8080:8080 -p 50000:50000 --mount "type=volume,volume-driver=cloudstor:azure,source=jenkins-data,destination=/var/jenkins_home" you-user/jenkins
FROM openjdk:8-jdk
RUN apt-get update && apt-get install -y git curl && rm -rf /var/lib/apt/lists/*
ENV JENKINS_HOME /var/jenkins_home
ENV JENKINS_SLAVE_AGENT_PORT 50000
# Jenkins home directory is a volume, so configuration and build history
# can be persisted and survive image upgrades
VOLUME /var/jenkins_home
# `/usr/share/jenkins/ref/` contains all reference configuration we want
# to set on a fresh new installation. Use it to bundle additional plugins
# or config file with your custom jenkins Docker image.
RUN mkdir -p /usr/share/jenkins/ref/init.groovy.d
ENV TINI_VERSION 0.14.0
ENV TINI_SHA 6c41ec7d33e857d4779f14d9c74924cab0c7973485d2972419a3b7c7620ff5fd
# Use tini as subreaper in Docker container to adopt zombie processes
RUN curl -fsSL https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini-static-amd64 -o /bin/tini && chmod +x /bin/tini \
&& echo "$TINI_SHA /bin/tini" | sha256sum -c -
COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-agent-port.groovy
# jenkins version being bundled in this docker image
ARG JENKINS_VERSION
ENV JENKINS_VERSION ${JENKINS_VERSION:-2.46.2}
# jenkins.war checksum, download will be validated using it
ARG JENKINS_SHA=aa7f243a4c84d3d6cfb99a218950b8f7b926af7aa2570b0e1707279d464472c7
# Can be used to customize where jenkins.war get downloaded from
ARG JENKINS_URL=https://repo.jenkins-ci.org/public/org/jenkins-ci/main/jenkins-war/${JENKINS_VERSION}/jenkins-war-${JENKINS_VERSION}.war
# could use ADD but this one does not check Last-Modified header neither does it allow to control checksum
# see https://github.com/docker/docker/issues/8331
RUN curl -fsSL ${JENKINS_URL} -o /usr/share/jenkins/jenkins.war \
&& echo "${JENKINS_SHA} /usr/share/jenkins/jenkins.war" | sha256sum -c -
ENV JENKINS_UC https://updates.jenkins.io
# for main web interface:
EXPOSE 8080
# will be used by attached slave agents:
EXPOSE 50000
ENV COPY_REFERENCE_FILE_LOG $JENKINS_HOME/copy_reference_file.log
COPY jenkins-support /usr/local/bin/jenkins-support
COPY jenkins.sh /usr/local/bin/jenkins.sh
ENTRYPOINT ["/bin/tini", "--", "/usr/local/bin/jenkins.sh"]
# from a derived Dockerfile, can use `RUN plugins.sh active.txt` to setup /usr/share/jenkins/ref/plugins from a support bundle
COPY plugins.sh /usr/local/bin/plugins.sh
COPY install-plugins.sh /usr/local/bin/install-plugins.sh
from for-azure.
Same problem when trying to use a cloudstor volume with Jenkins. It won't install breaking with a file access issue.
Cloudstor is not very useful with this trait. Is there any workaround?
This is related:
https://forums.docker.com/t/changing-ownership-on-cloudstor-storage/30219
from for-azure.
(Quoting to keep track on the conversation at the forum)
Unfortunately the file permissions issue is a shortcoming of the CIFS protocol used by cloudstor. We will have a solution for this in the future when Azure exposes a way to create/attach individual VHDs to VMs in a VM Scale Set so that cloudstor does not have to rely on CIFS for storage.
https://forums.docker.com/t/changing-ownership-on-cloudstor-storage/30219/7
from for-azure.
This issue should be resolved in the Cloudstor build in 17.06. Please reopen if that is not the case.
from for-azure.
I get the same problem with the cloudstor:azure plugin:
Rabbitmq fails with "write error: No space left on device" and "Cookie file /var/lib/rabbitmq/.erlang.cookie must be accessible by owner only"
Running the compose file mentioned above:
Using docker plugin inspect
I get
[
{
"Config": {
"Args": {
"Description": "",
"Name": "",
"Settable": null,
"Value": null
},
"Description": "cloud storage plugin for Docker",
"DockerVersion": "17.07.0-ce",
"Documentation": "https://docs.docker.com/engine/extend/plugins/",
"Entrypoint": [
"/cloudstor"
],
"Env": [
{
"Description": "",
"Name": "CLOUD_PLATFORM",
"Settable": [
"value"
],
"Value": ""
},
{
"Description": "",
"Name": "AZURE_STORAGE_ACCOUNT",
"Settable": [
"value"
],
"Value": ""
},
{
"Description": "",
"Name": "AZURE_STORAGE_ACCOUNT_KEY",
"Settable": [
"value"
],
"Value": ""
},
{
"Description": "",
"Name": "AZURE_STORAGE_ENDPOINT",
"Settable": [
"value"
],
"Value": ""
},
{
"Description": "",
"Name": "EFS_ID_REGULAR",
"Settable": [
"value"
],
"Value": ""
},
{
"Description": "",
"Name": "EFS_ID_MAXIO",
"Settable": [
"value"
],
"Value": ""
},
{
"Description": "",
"Name": "EFS_SUPPORTED",
"Settable": [
"value"
],
"Value": ""
},
{
"Description": "",
"Name": "AWS_REGION",
"Settable": [
"value"
],
"Value": ""
},
{
"Description": "",
"Name": "AWS_STACK_ID",
"Settable": [
"value"
],
"Value": ""
},
{
"Description": "",
"Name": "DEBUG",
"Settable": [
"value"
],
"Value": ""
}
],
"Interface": {
"Socket": "cloudstor.sock",
"Types": [
"docker.volumedriver/1.0"
]
},
"IpcHost": false,
"Linux": {
"AllowAllDevices": true,
"Capabilities": [
"CAP_DAC_OVERRIDE",
"CAP_DAC_READ_SEARCH",
"CAP_SYS_ADMIN"
],
"Devices": null
},
"Mounts": [
{
"Description": "",
"Destination": "/dev",
"Name": "",
"Options": [
"rbind"
],
"Settable": null,
"Source": "/dev",
"Type": "bind"
}
],
"Network": {
"Type": "host"
},
"PidHost": false,
"PropagatedMount": "/mnt",
"User": {},
"WorkDir": "",
"rootfs": {
"diff_ids": [
"sha256:xxx"
],
"type": "layers"
}
},
"Enabled": true,
"Id": "xxx",
"Name": "cloudstor:azure",
"PluginReference": "docker.io/docker4x/cloudstor:17.06.2-ce-azure1",
"Settings": {
"Args": [],
"Devices": [],
"Env": [
"CLOUD_PLATFORM=AZURE",
"AZURE_STORAGE_ACCOUNT=xxx",
"AZURE_STORAGE_ACCOUNT_KEY=xxx",
"AZURE_STORAGE_ENDPOINT=",
"EFS_ID_REGULAR=",
"EFS_ID_MAXIO=",
"EFS_SUPPORTED=",
"AWS_REGION=",
"AWS_STACK_ID=",
"DEBUG=1"
],
"Mounts": [
{
"Description": "",
"Destination": "/dev",
"Name": "",
"Options": [
"rbind"
],
"Settable": null,
"Source": "/dev",
"Type": "bind"
}
]
}
}
]
from for-azure.
Seems to be a problem with setting permission 400 files: docker-library/rabbitmq#171
from for-azure.
Related Issues (20)
- Newly provisioned swarm is not working as swarm is not initialized. HOT 5
- Cloudstor plugin not enabled in newly provisioned swarm HOT 11
- Cannot SSH into node after VM restart - no agent container HOT 3
- waagent.log is not rotating 18.03.0-ce HOT 1
- tcp4 / tcp port not being exposed/mapped to running container after it's been in use before
- Not able to share cloudstor azure named volumes across multiple containers on same host HOT 12
- Docker logs not moving to storage accounts instead kept on Disk. HOT 3
- how to enable auto-scaling for swarm-worker-vmss on the basis of Memory usage
- Cloudstor: Prevent deletion of underlying Azure file share when docker volume is removed. HOT 2
- Fail to deploy Docker for Azure HOT 3
- Unable to SSH into Manager VMSS's after upgrading the instance(s) to the last mode on Azure portal HOT 2
- Project no longer supported? HOT 10
- Mongodb failed to run with persisted volume with cloudstor plugin. HOT 2
- Enable hard link support in cloudstor:azure
- Cannot restart docker daemon on management nodes
- VMSS restart hangs indefinitely at creating .ssh directory
- Error response from daemon: plugin cloudstor:azure already exists
- Storage account
- Can't connect to my Azure Docker Image BDD from SQL Management Studio
- Does not work at all
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from for-azure.