Giter Site home page Giter Site logo

Add new user to existing container about sftp HOT 4 CLOSED

atmoz avatar atmoz commented on May 13, 2024
Add new user to existing container

from sftp.

Comments (4)

atmoz avatar atmoz commented on May 13, 2024

In what scenario do you need to stop and start this container when you can simply recreate it (after updating sftp-users.conf)?

from sftp.

cthiebault avatar cthiebault commented on May 13, 2024

When using this image with Docker Compose : if I add users to my config, I need to manually destroy the container... I can't do just docker-compose up -d.
But you are right, I should be able to recreate this container without loosing anything!

from sftp.

cthiebault avatar cthiebault commented on May 13, 2024

In theory, you are right : Docker compose should recreates container when config changed (it does this for nginx for example).

I don't understand why docker compose does not recreate the container automatically when I add new users to sftp-users.conf.

Here is my docker-compose.yml:

version: '2'

services:

  sftp:    
    image: atmoz/sftp
    ports:
      - "2222:22"
    volumes:
      - ./sftp-users.conf:/etc/sftp-users.conf:ro
      - /srv/docker/sftp:/home

Using nginx image, docker compose recreates nginx container when I change config file... but it does not with sftp image :(

nginx:
  image: nginx
  volumes:
    - ./nginx/my-app.conf:/etc/nginx/conf.d/my-app.conf:ro    
    - ./nginx/htpasswd:/auth/htpasswd:ro

Any idea?

from sftp.

atmoz avatar atmoz commented on May 13, 2024

docker-compose up -d --force-recreate should recreate containers. Specify your sftp container name, to only recreate that.

from sftp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.