refstack-client/docker/Dockerfile
sslypushenko 648b325a59 Add scripts for running refstack-client in docker
Prerequisites:

Linux host with Docker installed.

Usage:

./docker/env_build - script removes previous container if eny and builds
an updated `refstack-client` image
./docker/env_up - script setups environment in container if is the first run
and joins to shell in this container

Basic usage example:

1) Checkout repository
2) Run ./docker/env_build.sh
3) Run ./docker/env_up.sh
...
You will get Bash console in the prepared dockerized environment.

4) Run ./docker/env_up.sh  to get back to shell in the env
5) Run ./docker/env_build.sh to rebuild image and spin a new env
container.

NOTE: These scripts are safe to run locally.

Change-Id: I51e34a5d130d9595ead948f7ddb0db840527a797
2017-05-04 08:56:48 +03:00

18 lines
458 B
Docker

FROM ubuntu:16.04
RUN apt-get update && \
apt-get install -y sudo curl vim less tar
ARG UID
ARG GID
ENV DEV_USER=ubuntu COLUMNS=120
RUN [ ! $(grep ":${GID}:" /etc/group) ] && groupadd -g ${GID:-1000} ${DEV_USER}
RUN useradd -g ${DEV_USER} -u ${UID:-1000} -s /bin/bash -d /home/${DEV_USER} -m ${DEV_USER} && \
( umask 226 && echo "${DEV_USER} ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/50_${DEV_USER} )
USER ${DEV_USER}
WORKDIR /home/${DEV_USER}