Commit e794eeae authored by pfandzelter's avatar pfandzelter
Browse files

Merge branch 'tp/fix-docker-image' into 'master'

Tp/fix docker image

See merge request !30
parents f2f641b5 6d8b9bda
*
!frednode
\ No newline at end of file
Dockerfile
\ No newline at end of file
# building the binary
FROM golang:alpine as golang
FROM golang:1.13-alpine as golang
MAINTAINER Tobias Pfandzelter <tp@mcc.tu-berlin.de>
RUN apk add --no-cache libzmq-static czmq-dev libsodium-static build-base util-linux-dev
RUN mkdir /lib64 && ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2
WORKDIR /go/src/gitlab.tu-berlin.de/mcc-fred/fred/
COPY . .
# Static build required so that we can safely copy the binary over.
RUN CGO_ENABLED=0 GOOS=linux go install -a -tags netgo -ldflags '-w' ./cmd/frednode/main.go
RUN touch ./cmd/frednode/dummy.cc
RUN go install -a -ldflags '-linkmode external -w -s -extldflags "-static -luuid" ' ./cmd/frednode/
# actual Docker image
FROM scratch
COPY --from=golang /go/bin/main frednode
COPY --from=golang /go/bin/frednode frednode
EXPOSE 9001
......
package main
import "C"
import (
"flag"
"fmt"
......
Supports Markdown
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