Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docksal Support for Alpine Images #942

Closed
mkochendorfer opened this issue Jan 29, 2019 · 3 comments
Closed

Docksal Support for Alpine Images #942

mkochendorfer opened this issue Jan 29, 2019 · 3 comments
Assignees
Labels
🏷enhancement size/medium Effort in T-Shirt scale

Comments

@mkochendorfer
Copy link

Right now fin seems to have a hard dependency on bash for many operations in the containers to function. This means that when running containers (like Alpine based images) you will run into many different issues with various fin commands. fin bash and fin exec being the 2 most obvious commands. There are work arounds for some of these things by falling back to docker-compose, but that limits the benefits of fin greatly. fin dc run <container> /bin/ash for example will get you to a shell in an Alpine based image.

node:10.15.0-alpine was the specific image I was testing with from https://hub.docker.com/_/node/ for reference.

@achekulaev
Copy link
Member

achekulaev commented Jan 29, 2019

Since there is no way to know which shell will be inside the container and using SH all the time is not an option, I can propose adding a feature, a parameter to exec - --shell giving ability to provide a shell binary

fin exec --in=mycontainer --shell=/bin/ash whatever

But I'm not sure if that will be convenient. This looks like a very long line. If I were in your shoes I would create a custom command to run ash or whatever you need in your custom containers.

.docksal/commands/ash

#!/bin/bash

## Runs ash shell with commands provided in <container>
##
## Usage: fin ash <command> [params]

fin dc run <container> /bin/ash -c "$@"

@achekulaev achekulaev self-assigned this Jan 29, 2019
@mkochendorfer
Copy link
Author

Yeah, that is a good thought in terms of approach

@lmakarov lmakarov added this to To do in Docksal 1.13.0 via automation Mar 5, 2019
@achekulaev achekulaev added this to To do in Docksal 1.12.0 via automation Mar 6, 2019
@achekulaev achekulaev removed this from To do in Docksal 1.13.0 Mar 6, 2019
@achekulaev achekulaev added 🏷enhancement size/small Effort in T-Shirt scale size/medium Effort in T-Shirt scale and removed discussion size/small Effort in T-Shirt scale labels Mar 6, 2019
@achekulaev
Copy link
Member

achekulaev commented Mar 6, 2019

In the end what will happens is that exec will use sh by default so it will properly work for alpine images after the PR above is merged

Docksal 1.12.0 automation moved this from To do to Done Mar 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷enhancement size/medium Effort in T-Shirt scale
Projects
No open projects
Development

No branches or pull requests

2 participants