Skip to content
This repository has been archived by the owner on Nov 24, 2019. It is now read-only.

docker image is broke on jessie #63

Open
synman opened this issue Apr 5, 2019 · 2 comments
Open

docker image is broke on jessie #63

synman opened this issue Apr 5, 2019 · 2 comments

Comments

@synman
Copy link

synman commented Apr 5, 2019

I pulled down source tonight to make some changes and found the docker image has some issues resolving apt targets. I've encountered this before (it's due to jessie getting mothballed) and figured I'd share here for others wanting to build directly on their pi with an octopi distro.

Use the following for your Dockerfile:

ARG IMAGE
FROM ${IMAGE}

ARG GO_TAGS
ENV GO_TAGS=${GO_TAGS}

RUN echo "deb [check-valid-until=no] http://cdn-fastly.deb.debian.org/debian jessie main" > /etc/apt/sources.list.d/jessie.list
RUN echo "deb [check-valid-until=no] http://archive.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list
RUN sed -i '/deb http:\/\/deb.debian.org\/debian jessie-updates main/d' /etc/apt/sources.list
RUN apt-get -o Acquire::Check-Valid-Until=false update

RUN apt-get -o Acquire::Check-Valid-Until=false update && apt-get -o Acquire::Check-Valid-Until=false install -y --no-install-recommends \
  git build-essential \
  debhelper devscripts fakeroot git-buildpackage dh-make dh-systemd dh-golang \
  libcairo2-dev \
  libgtk-3-dev

# We cache go get gtk, to speed up builds.
#RUN go get -tags ${GO_TAGS} -v github.com/gotk3/gotk3/gtk/...

ADD . ${GOPATH}/src/github.com/mcuadros/OctoPrint-TFT/
#RUN go get -tags ${GO_TAGS} -v ./...

WORKDIR ${GOPATH}/src/github.com/mcuadros/OctoPrint-TFT/
@SpeedyRS2
Copy link

SpeedyRS2 commented Apr 10, 2019

I had the same problem.

I solved it, by making some dirty changes to the makefile.
I changed the package properties from the jessie-part to the same values as the stretch properties.
`
DEBIAN_PACKAGES = JESSIE STRETCH
STRETCH_NAME := stretch
STRETCH_IMAGE := golang:1.9-stretch
STRETCH_GO_TAGS := gtk_3_22

JESSIE_NAME := stretch
JESSIE_IMAGE := golang:1.9-stretch
JESSIE_GO_TAGS := gtk_3_22
`

With this little changes I could compile the sourcecode under my debian stretch system.

@synman
Copy link
Author

synman commented Apr 10, 2019

which I'm sure is great if you don't want the Jessie binaries.

I would go a step further and remove JESSIE from the DEBIAN_PACKAGES line. Will cut your build time in half.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants