Skip to content
Snippets Groups Projects

Add Dockerfile for image building

Merged Stéphane Veyret requested to merge ReleaseDockerfile into master
2 files
+ 62
0
Compare changes
  • Side-by-side
  • Inline
Files
2
Dockerfile 0 → 100644
+ 35
0
# Image for Duniter releases on Linux.
#
# Building this image:
# docker build . -t duniter/release-builder
FROM ubuntu:16.04
MAINTAINER Stéphane Veyret <sveyret@gmail.com>
ENV DEBIAN_FRONTEND noninteractive
# Install needed tools
RUN apt-get update && \
apt-get install -y apt-transport-https curl && \
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
apt-get update && \
apt-get install -y git build-essential yarn python-minimal zip && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Create compiling user
RUN mkdir /duniter && \
adduser --system --group --quiet --shell /bin/bash --home /duniter duniter && \
chown duniter:duniter /duniter
WORKDIR /duniter
# Load NVM
ENV NVM_DIR "/duniter/.nvm"
USER duniter
RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bash
USER root
# Entry point
COPY bootstrap.sh /root/bootstrap.sh
RUN chmod u+x /root/bootstrap.sh
ENTRYPOINT ["/root/bootstrap.sh"]
Loading