Fix Bash Error in Docker
I really enjoy working with Docker because it gives me more insight into creating and maintaining your own environments, mostly from scratch. I instantly gained a greater appreciation for Ops engineers, package creators, and other engineers who work on low level software. I think what I'm trying to say is that I've made a whole bunch of mistakes and completed an insane amount of Google searches for help.
One of the more basic errors I've recently encountered was trying to run a bash script within the container, only to get the following error: env: can't execute 'bash': No such file or directory
. I was under the impression that bash was always a given in Linux machines, but apparently not in alpine
images. The fix was adding the following to my Dockerfile
file:
RUN apk update && apk add bash
Or if you're in the machine, just run:
apk update && apk add bash
That command installs bash and your bash scripts should then work!
![39 Shirts – Leaving Mozilla]()
In 2001 I had just graduated from a small town high school and headed off to a small town college. I found myself in the quaint computer lab where the substandard computers featured two browsers: Internet Explorer and Mozilla. It was this lab where I fell...
![LightFace: Facebook Lightbox for MooTools]()
One of the web components I've always loved has been Facebook's modal dialog. This "lightbox" isn't like others: no dark overlay, no obnoxious animating to size, and it doesn't try to do "too much." With Facebook's dialog in mind, I've created LightFace: a Facebook lightbox...
![Create WordPress Page Templates with Custom Queries]()
One of my main goals with the redesign was to make it easier for visitors to find the information that was most popular on my site. Not to my surprise, posts about MooTools, jQuery, and CSS were at the top of the list. What...
![MooTools: Set Style Per Media]()
I'd bet one of the most used MooTools methods is the setStyle()
method, which allows you to set CSS style declarations for an element. One of the limitations of MooTools' setStyle()
method is that it sets the specific style for all medias.
Alternatively, you can use
ash
instead of bash.Not sure what the differences are, but I would expect parity on most standard features.
If the script is simple you can use the default /bin/sh shell.