简体   繁体   中英

alpine image error: /bin/sh: can't access tty; job control turned off

I have redis pod with cpec:

spec:
  containers:
    - name: master
      image: xyzwy/redis:7.0
      command: ["sh", "-ic"]
      args:
        - redis-server
        - /bin/sh

when I deploy it i get an error in a first line:

***/bin/sh: can't access tty; job control turned off***
1:C 09 May 2022 13:31:44.287 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1:C 09 May 2022 13:31:44.287 # Redis version=7.0.0, bits=64, commit=00000000, modified=0, pid=1, just started
1:C 09 May 2022 13:31:44.287 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
1:M 09 May 2022 13:31:44.288 * monotonic clock: POSIX clock_gettime
1:M 09 May 2022 13:31:44.289 * Running mode=standalone, port=6379.
1:M 09 May 2022 13:31:44.289 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
1:M 09 May 2022 13:31:44.290 # Server initialized
1:M 09 May 2022 13:31:44.291 * The AOF directory appendonlydir doesn't exist
1:M 09 May 2022 13:31:44.291 * Ready to accept connections

how can I solve this?

Problem was in

command: ["sh", "-ic"]

-i can not be there, it is not interactive

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM