-
Notifications
You must be signed in to change notification settings - Fork 38
Patch origin #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Patch origin #5
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,28 @@ | ||
FROM ubuntu:15.10 | ||
FROM ubuntu:14.04 | ||
MAINTAINER Joey Baker <[email protected]> | ||
|
||
ENV SYNCTHING_VERSION 0.12.11 | ||
|
||
RUN apt-get update \ | ||
&& apt-get upgrade -y --no-install-recommends \ | ||
&& apt-get install curl ca-certificates -y --no-install-recommends \ | ||
&& apt-get autoremove -y \ | ||
&& apt-get clean | ||
|
||
ENV SYNCTHING_VERSION 0.12.11 | ||
ENV SYNCTHING_USER syncthing | ||
ENV UID 1027 | ||
|
||
# grab gosu for easy step-down from root | ||
RUN gpg --keyserver pgp.mit.edu --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ | ||
&& curl -o /usr/local/bin/gosu -SL "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture)" \ | ||
&& curl -o /usr/local/bin/gosu.asc -L "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture).asc" \ | ||
&& curl -o /usr/local/bin/gosu -SL "https://github.com/tianon/gosu/releases/download/1.7/gosu-$(dpkg --print-architecture)" \ | ||
&& curl -o /usr/local/bin/gosu.asc -L "https://github.com/tianon/gosu/releases/download/1.7/gosu-$(dpkg --print-architecture).asc" \ | ||
&& gpg --verify /usr/local/bin/gosu.asc \ | ||
&& rm /usr/local/bin/gosu.asc \ | ||
&& chmod +x /usr/local/bin/gosu | ||
|
||
# get syncthing | ||
WORKDIR /srv | ||
RUN useradd --no-create-home -g users syncthing | ||
RUN export version=0.12.9 \ | ||
&& curl -L -o syncthing.tar.gz https://github.com/syncthing/syncthing/releases/download/v$SYNCTHING_VERSION/syncthing-linux-amd64-v$SYNCTHING_VERSION.tar.gz \ | ||
RUN useradd --no-create-home -g users --uid $UID $SYNCTHING_USER | ||
RUN curl -L -o syncthing.tar.gz https://github.com/syncthing/syncthing/releases/download/v$SYNCTHING_VERSION/syncthing-linux-amd64-v$SYNCTHING_VERSION.tar.gz \ | ||
&& tar -xzvf syncthing.tar.gz \ | ||
&& rm -f syncthing.tar.gz \ | ||
&& mv syncthing-linux-amd64-v* syncthing \ | ||
|
@@ -32,10 +33,8 @@ RUN export version=0.12.9 \ | |
|
||
VOLUME ["/srv/data", "/srv/config"] | ||
|
||
ADD ./start.sh /srv/start.sh | ||
ADD ./files/start.sh /srv/start.sh | ||
RUN chmod 770 /srv/start.sh | ||
|
||
ENV UID=1027 | ||
|
||
ENTRYPOINT ["/srv/start.sh"] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
all: build | ||
|
||
build: | ||
@docker build --tag=joeybaker/syncthing:latest . | ||
|
||
base: | ||
@docker pull ubuntu:14.04 | ||
|
||
rebuild: base | ||
@docker build --tag=joeybaker/syncthing:latest . | ||
|
||
release: rebuild | ||
@docker build --tag=joeybaker/syncthing:0.12.11 . | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doesn't this mean we'll need to change the version in two files? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes it does, maybe there is a clever way to use environment variables from the build? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hmmm… I think so… https://docs.docker.com/engine/reference/builder/#arg should do the trick? The only problem with the makefile approach though is that the repo can't auto-deploy to docker hub on push to master. What do you think? |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# https://docs.docker.com/compose/yml/ | ||
|
||
syncthing: | ||
container_name: syncthing | ||
hostname: syncthing | ||
image: joeybaker/syncthing | ||
ports: | ||
- "22000:22000" | ||
- "8080:8080" | ||
- "21025:21025/udp" | ||
volumes: | ||
- /srv/docker/syncthing/data:/srv/data | ||
- /srv/docker/syncthing/config:/srv/config | ||
restart: always |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why downgrade ubuntu?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's the common practice I've seen for ubuntu based image and
ubuntu:latest
does point toubuntu:14.04
(see https://hub.docker.com/_/ubuntu/). But it's arguable.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. I guess it's just b/c 14.04 is the LTS release. I don't know enough about what v15 offers to ignore the stability, so makes sense to me!