App doesn't build in Docker: `slackInfo.IMs undefined` etc.
Closed this issue · 2 comments
dgpokl commented
- Version of phabulous: tried with
v3.0.0-beta3
and with master - Version of phabricator: didn't get that far
- Relevant log output (if applicable)
Step 12/12 : RUN go get -v -d github.com/etcinit/phabulous/cmd/phabulous && go install github.com/etcinit/phabulous/cmd/phabulous
---> Running in 9fd79151c599
github.com/Sirupsen/logrus (download)
get "golang.org/x/sys/unix": found meta tag get.metaImport{Prefix:"golang.org/x/sys", VCS:"git", RepoRoot:"https://go.googlesource.com/sys"} at //golang.org/x/sys/unix?go-get=1
get "golang.org/x/sys/unix": verifying non-authoritative meta tag
golang.org/x/sys (download)
github.com/codegangsta/cli (download)
github.com/cpuguy83/go-md2man (download)
github.com/davecgh/go-spew (download)
github.com/etcinit/gonduit (download)
github.com/karlseguin/typed (download)
github.com/jacobstr/confer (download)
github.com/spf13/cast (download)
github.com/BurntSushi/toml (download)
github.com/spf13/jwalterweatherman (download)
get "gopkg.in/yaml.v2": found meta tag get.metaImport{Prefix:"gopkg.in/yaml.v2", VCS:"git", RepoRoot:"https://gopkg.in/yaml.v2"} at //gopkg.in/yaml.v2?go-get=1
gopkg.in/yaml.v2 (download)
github.com/spf13/pflag (download)
github.com/kr/pretty (download)
github.com/kr/text (download)
github.com/nlopes/slack (download)
github.com/fluffle/goirc (download)
github.com/golang/mock (download)
get "golang.org/x/net/proxy": found meta tag get.metaImport{Prefix:"golang.org/x/net", VCS:"git", RepoRoot:"https://go.googlesource.com/net"} at //golang.org/x/net/proxy?go-get=1
get "golang.org/x/net/proxy": verifying non-authoritative meta tag
golang.org/x/net (download)
github.com/gin-gonic/gin (download)
github.com/gin-contrib/sse (download)
github.com/go-playground/validator (download)
github.com/go-playground/universal-translator (download)
github.com/go-playground/locales (download)
github.com/leodido/go-urn (download)
github.com/golang/protobuf (download)
github.com/ugorji/go (download)
github.com/mattn/go-isatty (download)
github.com/facebookgo/inject (download)
github.com/facebookgo/structtag (download)
# github.com/etcinit/phabulous/app/connectors
app/connectors/slack_bot.go:20:30: slackInfo.IMs undefined (type *slack.Info has no field or method IMs)
app/connectors/slack_poster.go:33:21: cannot use storyText (type string) as type slack.MsgOption in argument to c.slack.PostMessage
app/connectors/slack_poster.go:36:30: cannot use slack.PostMessageParameters literal (type slack.PostMessageParameters) as type slack.MsgOption in argument to c.slack.PostMessage
app/connectors/slack_poster.go:63:21: cannot use storyText (type string) as type slack.MsgOption in argument to c.slack.PostMessage
app/connectors/slack_poster.go:66:30: cannot use slack.PostMessageParameters literal (type slack.PostMessageParameters) as type slack.MsgOption in argument to c.slack.PostMessage
app/connectors/slack_poster.go:70:4: unknown field 'Attachments' in struct literal of type slack.PostMessageParameters
To reproduce:
- I added a reasonable config to main.yml and then ran
docker build .
- output was as shown above.
This seems like an api change with the slack dependency maybe? I regret that I don't know enough Go to know how to work around this. I am aware that this project is in a pretty inactive state so I'm not expecting an immediate fix from anyone, but just wanted to see if anyone else sees the same thing and see if anyone more versed in Go may have come up with a workaround.
retsimx commented
I ran in to this problem deploying this project today. It's because the Dockerfile isn't using dep - which it should be. Here is an updated Dockerfile which will work:-
FROM golang
MAINTAINER Eduardo Trujillo <ed@chromabits.com>
RUN apt-get update && apt-get install -y go-dep
ENTRYPOINT ["/go/bin/phabulous"]
CMD ["serve"]
EXPOSE 8085
RUN mkdir -p /go/src/github.com/etcinit/phabulous
WORKDIR /go/src/github.com/etcinit/phabulous
COPY app ./app
COPY cmd ./cmd
COPY config ./config
COPY LICENSE .
COPY Gopkg.toml .
COPY Gopkg.lock .
COPY vendor .
RUN dep ensure
RUN go get -v -d github.com/etcinit/phabulous/cmd/phabulous \
&& go install github.com/etcinit/phabulous/cmd/phabulous
dgpokl commented
Closing since project appears to be inactive.