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!
![9 More Mind-Blowing WebGL Demos]()
With Firefox OS, asm.js, and the push for browser performance improvements, canvas and WebGL technologies are opening a world of possibilities. I featured 9 Mind-Blowing Canvas Demos and then took it up a level with 9 Mind-Blowing WebGL Demos, but I want to outdo...
![How to Create a Twitter Card]()
One of my favorite social APIs was the Open Graph API adopted by Facebook. Adding just a few META tags to each page allowed links to my article to be styled and presented the way I wanted them to, giving me a bit of control...
![Redacted Font]()
Back when I created client websites, one of the many things that frustrated me was the initial design handoff. It would always go like this:
Work hard to incorporate client's ideas, dream up awesome design.
Create said design, using Lorem Ipsum text
Send initial design concept to the client...
![Event Delegation with MooTools]()
Events play a huge role in JavaScript. I can't name one website I've created in the past two years that hasn't used JavaScript event handling on some level. Ask yourself: how often do I inject elements into the DOM and not add an...
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.