atendeticket 2.1.21 → 2.1.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,9 +3,20 @@ const { info, success } = require('../../core/logger');
3
3
 
4
4
  async function installDocker() {
5
5
  info('Instalando Docker...');
6
- await runCommand('sudo', ['apt', 'install', '-y', 'docker.io']);
6
+
7
+ // Tenta remover versões pré-instaladas ou conflitantes (opcional, mas recomendado)
8
+ try {
9
+ await runCommand('sudo', ['apt-get', 'remove', '-y', 'docker', 'docker-engine', 'docker.io', 'containerd', 'runc']);
10
+ } catch (err) {
11
+ // Ignora erros se não houver o que remover
12
+ }
13
+
14
+ // Instala usando o script oficial
15
+ await runCommand('bash', ['-c', 'curl -fsSL https://get.docker.com | sh']);
16
+
7
17
  await runCommand('sudo', ['systemctl', 'enable', '--now', 'docker']);
8
- success('Docker instalado!');
18
+
19
+ success('Docker instalado com sucesso!');
9
20
  }
10
21
 
11
22
  module.exports = { installDocker };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "atendeticket",
3
- "version": "2.1.21",
3
+ "version": "2.1.22",
4
4
  "description": "Instalador CLI para AtendeTicket",
5
5
  "main": "index.js",
6
6
  "scripts": {