Commit 6e7d0bd1 authored by zauberstuhl's avatar zauberstuhl
Browse files

Implement portal multi stage build

parent 8214c112
FROM golang:1.12
ENV build_dir=/go/src/git.feneas.org/feneas/infrastructure
WORKDIR $build_dir
RUN git clone https://git.feneas.org/feneas/infrastructure/members-portal.git
WORKDIR $build_dir/members-portal
RUN go get -u github.com/golang/dep/cmd/dep
RUN make install compile
RUN cp $build_dir/members-portal/*.tar.gz /tmp
FROM debian:jessie
RUN apt-get update && apt-get install -y ca-certificates
RUN adduser --disabled-password portal
ADD members-portal.tar.gz /home/portal
WORKDIR /home/portal
COPY --from=0 /tmp/members-portal.tar.gz .
RUN tar -xf members-portal.tar.gz -C /home/portal
WORKDIR /home/portal
ADD entrypoint.sh /home/portal/entrypoint.sh
RUN chmod +x entrypoint.sh
RUN chown -R portal:portal /home/portal
......
# Members Portal
Build and generate the portal first (see https://git.feneas.org/feneas/infrastructure/members-portal)!
Then build the docker image:
Compile app and docker image by running:
docker build -t feneas/members-portal:v1.0.0 .
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment