add a development Dockerfile

This commit is contained in:
little-bobby-tables 2017-08-19 16:01:02 +07:00
parent 14f78e3734
commit 628ba81a4c
2 changed files with 34 additions and 0 deletions

23
docker/Dockerfile Normal file
View file

@ -0,0 +1,23 @@
FROM rust:1.19.0-stretch
RUN apt-get update \
&& apt-get -y install curl build-essential clang pkg-config libjpeg-turbo-progs libpng-dev \
&& rm -rfv /var/lib/apt/lists/*
ENV MAGICK_VERSION 7.0.6-7
RUN curl https://www.imagemagick.org/download/ImageMagick-${MAGICK_VERSION}.tar.gz | tar xz \
&& cd ImageMagick-${MAGICK_VERSION} \
&& ./configure --with-magick-plus-plus=no --with-perl=no \
&& make \
&& make install \
&& cd .. \
&& rm -r ImageMagick-${MAGICK_VERSION}
RUN adduser --disabled-password --gecos '' magick-rust
USER magick-rust
ENV USER magick-rust
WORKDIR /src

11
docker/docker-compose.yml Normal file
View file

@ -0,0 +1,11 @@
version: '3'
services:
magick-rust:
build:
context: .
dockerfile: Dockerfile
volumes:
- ..:/src
stdin_open: true
tty: true