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/
WORKDIR $build_dir
RUN git clone
WORKDIR $build_dir/members-portal
RUN go get -u
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 /home/portal/
RUN chmod +x
RUN chown -R portal:portal /home/portal
# Members Portal
Build and generate the portal first (see!
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