Here's my Dockerfile:
FROM php:5-fpm
RUN apt-get update
RUN apt-get install -y php5-mysql
RUN apt-get install -y php5-xdebug
RUN apt-get install -y php5-mcrypt
RUN apt-get install -y php5-gd
When I run from Docker for Mac everything works great. But from my Linux machine I get:
E: Package 'php5-mysql' has no installation candidate
The command '/bin/sh -c apt-get install -y php5-mysql' returned a non-zero code: 100
Shouldn't these behave the same?
UPDATE 1
Thanks to @caylorme for recommending I check the base image on both hosts. They are indeed different image ids.
On the Linux host:
$ sudo docker images php
REPOSITORY TAG IMAGE ID CREATED SIZE
php 5-fpm 9b179c4d385e 7 days ago 367MB
On the Mac host:
$ docker images php
REPOSITORY TAG IMAGE ID CREATED SIZE
php 5-fpm 707631468b8b 11 months ago 362MB
But how is that possible? I had assumed (wrongly I guess) that Docker image tags are immutable so you could guarantee reproducibility and rebuild/run on any Docker host. What can I do get the image that's on my Mac host on the Linux host?
RUN apt-get install -y php5-mysql php5-xdebug ...
)