Giter VIP home page Giter VIP logo

service-cli's People

Contributors

achekulaev avatar apugacescu avatar asgorobets avatar boegie avatar cindytwilliams avatar damonsharp avatar fjmk avatar halison-imagex avatar jeroennoten avatar jhedstrom avatar lmakarov avatar lpeabody avatar marvil07 avatar mf-lit avatar nebel54 avatar sean-e-dietrich avatar sergey-zabolotny avatar shahinam avatar shelane avatar spurlos avatar tsdevelopment avatar willjackson avatar zrhoffman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

service-cli's Issues

How to install forever for node.js

Hello,

Thank you for a great product.

Usually, I install the subj. so:

  $ [sudo] npm install forever -g

I did it inside the cli container.
But it does not see forever:

docker@cli:/var/www$ forever
bash: forever: command not found

Yarn executable not found in v2.3.0 en v2.4.0

Yarn was present and could be started directly in v2.2.0

$ docker run -t -i --rm docksal/cli:2.2-php7.1 /bin/bash
docker@c9f1773a7687:/var/www$ yarn -v
1.7.0

docker@c9f1773a7687:/var/www$ which yarn
/usr/bin/yarn

But in 2.3.0 and 2.4.0 it is missing.

$ docker run -t -i --rm docksal/cli:2.3-php7.1 /bin/bash
docker@1903e2648ff0:/var/www$ yarn -v
bash: yarn: command not found
$ docker run -t -i --rm docksal/cli:2.4-php7.1 /bin/bash
docker@3fedf4f59cf5:/var/www$ yarn
bash: yarn: command not found

I think I found the problem. v2.2.0 installed yarn using a package (as described on yarnpkg.com) by adding a repository and installing the yarn package. Starting from v2.3.0, yarn in installed using the install.sh script downloaded from yarnpkg.com. This results in yarn being installed in a other location:

Version location of yarn
2.2.0 /usr/bin/yarn
>= 2.3.0 /home/docker/.yarn/bin/yarn

Since /home/docker/.yarn/bin/ is missing from the $PATH variable, the yarn executable could not be found.

After adding it the the $PATH variable I got this message:

docker@cli:/var/www$ yarn
Yarn requires Node.js 4.0 or higher to be installed.

Yarn cannot find the node.js version installed in in /home/docker/.nvm/versions/node/. After adding /home/docker/.nvm/versions/node/v8.11.3/bin to $PATH, yarn could be executed.

docker@cli:/var/www$ yarn -v
1.8.0

Edit: The commit where the change from package to install script was made is 82a8258

PHP 7.1 and 7.2 images

Please create PHP 7.1 and 7.2 images. Some Drupal 8 projects requires at least 7.1.

Thank you

Best regards

Sometimes npm complains about /home/docker/.config

I'm not sure why it happens but sometimes after fin rm and fun up cli gets created in a weird manner and npm complains about that file. (docksal/cli:1.2-php7)

Creating this issue to track this behavior and possible issue. Output is below. You might notice that owner of some files is not docker but 501. Which is weird, because docker user should have had id equal to 501 after "Changing uid/gid in cli to 501/20 to match the host". But it did not. That explains the nature of the error, but does not explain how did we get here.

08:34:35 Alexei-Workstation /Users/alexei.chekulaev/Projects/demo
$ fin rm -f
Removing containers...
Stopping demo_web_1 ... done
Stopping demo_cli_1 ... done
Stopping demo_mail_1 ... done
Stopping demo_db_1 ... done
Removing demo_web_1 ... done
Removing demo_cli_1 ... done
Removing demo_mail_1 ... done
Removing demo_db_1 ... done
Removing network demo_default
Removing volume demo_project_root
Volume docksal_ssh_agent is external, skipping
Removing volume demo_host_home

08:35:05 Alexei-Workstation /Users/alexei.chekulaev/Projects/demo
$ fin up
Starting services...
Creating network "demo_default" with the default driver
Creating volume "demo_project_root" with local driver
Creating volume "demo_host_home" with local driver
Creating demo_mail_1
Creating demo_cli_1
Creating demo_db_1
Creating demo_web_1
Changing uid/gid in cli to 501/20 to match the host
Resetting permissions on /var/www...
chown: changing ownership of ‘/var/www/node_modules/.bin/esparse’: Input/output error
chown: changing ownership of ‘/var/www/node_modules/.bin/esvalidate’: Input/output error
chown: changing ownership of ‘/var/www/node_modules/.bin/js-yaml’: Input/output error
chown: changing ownership of ‘/var/www/vendor/bin/php-parse’: Input/output error
chown: changing ownership of ‘/var/www/vendor/bin/psysh’: Input/output error
chown: changing ownership of ‘/var/www/vendor/bin/robo’: Input/output error
chown: changing ownership of ‘/var/www/vendor/bin/terminus’: Input/output error
Restarting php daemon...
Connected vhost-proxy to "demo_default" network.

08:35:26 Alexei-Workstation /Users/alexei.chekulaev/Projects/demo
$ fin run ls -la /home/docker

┌──────────────────────────────────────────────────────────┐
│                 npm update check failed                  │
│           Try running with sudo or get access            │
│           to the local update config store via           │
│ sudo chown -R $USER:$(id -gn $USER) /home/docker/.config │
└──────────────────────────────────────────────────────────┘
total 64
drwxr-xr-x  24    501  100 4096 May  4 12:35 .
drwxr-xr-x  12 root   root 4096 May  4 12:35 ..
drwxr-xr-x   2 docker  100 4096 May  4 12:35 .acquia
-rw-r--r--   1 docker  100  140 Apr  7 17:41 .bash_aliases
-rw-r--r--   1    501  100  220 Nov  5 21:22 .bash_logout
-rw-r--r--   1    501  100 3618 Apr  7 17:39 .bashrc
drwxr-xr-x   6 docker  100 4096 May  4 12:35 .composer
-rw-r--r--   1 docker  100  377 Apr  7 17:29 .docksalrc
drwxr-xr-x   7 docker  100 4096 May  4 12:35 .drush
drwxr-xr-x 340 docker  100 4096 May  4 12:35 .npm
drwxr-xr-x  14    501  100 4096 May  4 12:35 .nvm
-rw-r--r--   1 docker  100  716 Apr  7 17:41 .profile
drwxr-xr-x   2 docker  100 4096 May  4 12:35 .ssh
lrwxrwxrwx   1    501  100   36 Apr  7 17:38 .zlogin -> /home/docker/.zprezto/runcoms/zlogin
lrwxrwxrwx   1    501  100   37 Apr  7 17:38 .zlogout -> /home/docker/.zprezto/runcoms/zlogout
drwxr-xr-x  10 docker  100 4096 May  4 12:35 .zprezto
lrwxrwxrwx   1    501  100   39 Apr  7 17:38 .zpreztorc -> /home/docker/.zprezto/runcoms/zpreztorc
lrwxrwxrwx   1    501  100   38 Apr  7 17:38 .zprofile -> /home/docker/.zprezto/runcoms/zprofile
lrwxrwxrwx   1    501  100   36 Apr  7 17:38 .zshenv -> /home/docker/.zprezto/runcoms/zshenv
lrwxrwxrwx   1    501  100   35 Apr  7 17:38 .zshrc -> /home/docker/.zprezto/runcoms/zshrc
drwxr-xr-x   4 docker  100 4096 May  4 12:35 drush6
drwxr-xr-x   4 docker  100 4096 May  4 12:35 drush7

Notice: no .config dir at all!


After I got to this situation I got confused, so I did fin rm and fin up once again. And it just went back to normal.

08:37:03 Alexei-Workstation /Users/alexei.chekulaev/Projects/demo
$ fin rm 
WARNING: All containers and volumes for the current project will be removed!
Continue? [y/n]: y
Removing containers...
Stopping demo_web_1 ... done
Stopping demo_db_1 ... done
Stopping demo_cli_1 ... done
Stopping demo_mail_1 ... done
Removing demo_web_1 ... done
Removing demo_db_1 ... done
Removing demo_cli_1 ... done
Removing demo_mail_1 ... done
Removing network demo_default
Removing volume demo_project_root
Volume docksal_ssh_agent is external, skipping
Removing volume demo_host_home

08:37:23 Alexei-Workstation /Users/alexei.chekulaev/Projects/demo
$ fin up
Starting services...
Creating network "demo_default" with the default driver
Creating volume "demo_project_root" with local driver
Creating volume "demo_host_home" with local driver
Creating demo_cli_1
Creating demo_mail_1
Creating demo_db_1
Creating demo_web_1
Changing uid/gid in cli to 501/20 to match the host
Resetting permissions on /var/www...
chown: changing ownership of ‘/var/www/node_modules/.bin/esparse’: Input/output error
chown: changing ownership of ‘/var/www/node_modules/.bin/esvalidate’: Input/output error
chown: changing ownership of ‘/var/www/node_modules/.bin/js-yaml’: Input/output error
chown: changing ownership of ‘/var/www/vendor/bin/php-parse’: Input/output error
chown: changing ownership of ‘/var/www/vendor/bin/psysh’: Input/output error
chown: changing ownership of ‘/var/www/vendor/bin/robo’: Input/output error
chown: changing ownership of ‘/var/www/vendor/bin/terminus’: Input/output error
Restarting php daemon...
Connected vhost-proxy to "demo_default" network.

08:37:45 Alexei-Workstation /Users/alexei.chekulaev/Projects/demo
$ fin exec ls
222  app.js  composer.json  composer.lock  docker-compose.yml  docroot  installer.phar  node_modules  vendor

Have master and release tag images match

With the current build/release process release tags are built separately (when a tag is published) from the master branch.

docksal/cli:<image-version>-php<php-version> != docksal/cli:php<php-version>

They should match.

This can be achieved by building tags from the latest stable versions instead if from scratch:

FROM docksal/cli:php<php-version>

Add rvm support

Make it possible to install additional Ruby versions and switch between them via rvm

Integration with Lastpass CLI

I would like to see Lastpass CLI integrated in service-cli container or even better - in separate standalone container independent from project.

https://github.com/lastpass/lastpass-cli

And ideally lastpass default config should be the following:

# let LPass passwords be read from standard input.
LPASS_DISABLE_PINENTRY=1
# Keep user signed in in LPass cli while container is running.
LPASS_AGENT_TIMEOUT=0

Examples:

Dockerfile (PHP 7.1)

FROM docksal/cli:2.2-php7.1
RUN apt-get update && apt-get -y --no-install-recommends install openssl \
    libcurl4-openssl-dev libxml2 libssl1.0-dev libxml2-dev pinentry-curses xclip \
    cmake build-essential pkg-config gcc libyaml-dev; \
    printf "\n" | pecl install yaml-2.0.2; \
    docker-php-ext-enable yaml; \
    rm lastpass-cli-1.3.1/ -rf; \
    wget -qO- https://github.com/lastpass/lastpass-cli/archive/v1.3.1.tar.gz | tar zxf -; \
    cd lastpass-cli-1.3.1; \
    make; \
    make install; \
    cd ..;\
    rm lastpass-cli-1.3.1/ -rf; \
    apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

Dockerfile (PHP 5.6)

FROM docksal/cli:1.3-php5
# Install Necessary libs.
RUN apt-get update; \
    apt-get -y --no-install-recommends install \
    libcurl4-openssl-dev \
    libxml2 \
    libssl-dev \
    libxml2-dev \
    pinentry-curses \
    xclip \
    cmake \
    pkg-config \
    php5-dev \
    libyaml-dev; \
    printf "\n" | pecl install yaml-1.3.1; \
    echo 'extension=yaml.so' | tee -a /etc/php5/mods-available/yaml.ini > /dev/null; \
    php5enmod yaml; \
    rm lastpass-cli-1.3.1/ -rf; \
    wget -qO- https://github.com/lastpass/lastpass-cli/archive/v1.3.1.tar.gz | tar zxf -; \
    cd lastpass-cli-1.3.1; \
    make; \
    make install; \
    cd ..;\
    rm lastpass-cli-1.3.1/ -rf; \
    apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

Detailed instructions: https://github.com/lastpass/lastpass-cli#debianubuntu

nvm does not work in `fin bash`

image: docksal/cli:2.4-php7.1

17:27:53 ~/Projects/test
§ fin exec nvm --version
0.33.11

17:28:00 ~/Projects/test
§ fin bash
docker@cli:/var/www$ nvm --version
bash: nvm: command not found
docker@cli:/var/www$ 

Add PHP 7.3 support

Since PHP 7.3.0 is now released, an image with support for PHP 7.3 should now also be built.

Customize port for web IDE

Currently right now the port is hardcoded for 3000 allow for this to be customized with an environment.

Add PHP GMP Extention

Hi,

I am sure someone has done this before.

How would I add php7.1-gmp extention to cli ?

I tried searching using apt-cache searc php-gmp but nothing came up.

Regards,
Amjad

Update software versions

  • Composer v1.4.2
  • Drush v8.1.11
  • Drupal Console Launcher v1.0.0-rc20
  • Magento CodeGen v1.6.4
  • nvm v0.33.2
  • nodejs v6.10.3

Include bcmath Drupal Commerce dependency ?

Drupal commerce for D8 has a dependency on bcmath. I was able to resolve with:

sudo apt-get update
sudo apt-get install php7.0-bcmath

Can we get bcmath included in the Dockerfile?

Deprecate PHP 5.6 and 7.0

PHP 5.6 and 7.0 are EOL (end-of-life) as of now.

image

We will deprecate them in the upcoming docksal/cli release (v2.6.0) and drop support entirely in the next version (v2.7.0).

Add nvm back

Originally reported in docksal/docksal#587

In the edge versions on docksal/cli nvm was removed and replaces with a global nodejs installation.
We should add nvm back, but without the default node version. This way, if someone needs a non-default (global) nodejs version, they can install it with nvm.

Empty SECRET_SSH_PRIVATE_KEY generates an empty id_rsa file

Empty SECRET_SSH_PRIVATE_KEY generates an empty id_rsa file and is causing issues with SSH authentication, I assume id_rsa is first key SSH will try to use, see command below for proof.

I believe the issue is present since 2.1 version of Docksal when this private key variable was introduced

Empty key:

fin exec cat /home/docker/.ssh/id_rsa                                                                                                                                                                  

Trying to SSH somewhere will try to use that key and ask for a passphrase (not sure why):

fin exec ssh -vvv example.com
.............
debug1: Trying private key: /home/docker/.ssh/id_rsa
Enter passphrase for key '/home/docker/.ssh/id_rsa':

Cann't override php.ini in 7.1

I am using the docksal/cli:edge-php7.1 image, which set default max_memory = 256MB for FPM. According to the docksal documentation, i should be able to override setting by placing a php.ini file in .docksal/etc/php/php.ini; this is not working anymore, even after i run 'fin reset'.

Add Drush Launcher to the project to better support site installed Drush 9

Currently one must be in the Drupal Webroot to use Drush. With projects moving to Drush 9 which is only supported installed per project adding the Drush Launcher makes sense.

Adding the Drush Launcher would allow running drush commands anywhere in a composer managed project and would automatically use the version of Drush installed in the project.

To allow Drush Launcher to fallback for projects that do not have Drush as part of the project (Drupal 7) the environmental variable DRUSH_LAUNCHER_FALLBACK should be set to the path to the globally installed Drush 8. The path to the Drush Launcher should be added to the $PATH so that it comes before any other drush command files.

See the command in this Drush Launcher issue for a command that will install the most recent version without having to update it each time a new version comes out.

Create 1.x, 2.x tags

Using latest image is not always the best way to go, since an image can have a major version update with incompatible changes.

But using static tag (1.3, 2.2...) is not the best way either, since configuration goes stale over time and then people who pick up an old project will have to refresh it to even start an old project on the new version of fin.

Using 1.x or 2.x tags, what should point to the latest minor version of the 1.x, 2.x etc. branch, would make more sense, since it is unlikely to break compatibility with your automation and configuration, but at the same time will keep one updated to the latest version of the image which will have the highest chances of being compatible with the latest Docksal.

How to add php_soap extension for edge-php7.2

I am looking for a way to add an extension for edge-php7.2. Not sure if there's a way to do it via the etc/php/php-fpm.conf file.

If that is not doable, is that mean i have to create a new image with the extension for now? I am thinking there may be a way to dynamically add extension in the current image.

Thanks.

How to add additional php modules?

I'm new to docker and docksal so maybe there is a very simple answer I didn't find yet:

Is there a way to configure additional php modules? For example I'm adding a redis container to my setup and would need php7.0-redis to be installied in the cli container. How would I do that?

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.