CentOS 6.6 Samba 4 Container - 282.2MB
100K+
Samba Container Build
Built from appcontainers/centos66
Build container using default values.
docker build -t appcontainers/samba .
Running the container
The container is built to allow several configurable variables to be passed in at runtime. The values are as follows:
ENV SMB_USER samba ENV SMB_PASS password
Run the container using default values
docker run -d -it --name samba -h samba -p 138:138/udp -p 139:139 -p 445:445 -p 445:445/udp appcontainers/samba
This will assume the following
Example: If you have an apache server where the application runs in either /home or /var/www/html (public) You can start the apache container as normal making the /var/www/html a data volume, and then connect to it via this samba container
docker run -d -it --name apache -h apache -p 80:80 -p 443:443 -v /var/www/html yourrepo/apache
Run the container substituting the $varables with your own custom values and attach to the example apache server above
docker run -d -it \
--name samba \
-h samba \
-p 138:138/udp \
-p 139:139 \
-p 445:445 \
-p 445:445/udp \
--volumes-from apache \
-e SMB_USER='admin' \
-e SMB_PASS='connect' \
appcontainers/samba
In this instance connecting to the samba server via your client, would present the /var/www/html folder contents of the apache server running the data volume as indicated in the --volumes-from apache line in the docker run statement when starting the samba container.
The container can also be started as a standalone samba container without the --volumes-from line, in which case will only share the local /home and /var/www/html directories residing on the samba container.
Navigate to the IP address of the server using either the //serverip from windows or CMD+K -> smb://serverip from OSX in order to access the samba shares running on the samba container.
Content type
Image
Digest
sha256:4dde3d008…
Size
96.1 MB
Last updated
almost 11 years ago
docker pull appcontainers/samba