Skip to content

Instantly share code, notes, and snippets.

@callahad
Last active November 15, 2022 17:57
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save callahad/10603854 to your computer and use it in GitHub Desktop.
Save callahad/10603854 to your computer and use it in GitHub Desktop.
Preliminary Firefox Sync Dockerfile

Preliminary work on a Docker version of "How To Run Firefox Sync 1.5"

Prerequisites

  1. Docker
  2. Firefox 29 (Beta), or newer

Building and running the server

With the Dockerfile below in the current directory, run:

  1. docker build -t sync:server .
  2. docker run -i -t -p 5000:5000 sync:server
  3. Visit http://localhost:5000, it should say "it works!"

Using the server

  1. Go to about:config, change services.sync.tokenServerURI to http://localhost:5000/token/1.0/sync/1.5
  2. Open the Browser Console (Ctrl-Shift-J)
  3. Try to use Firefox Sync -- you should see log output from Docker, and the Browser Console should show connections to http://localhost:5000
FROM debian:7.4
MAINTAINER Dan Callahan <dan.callahan@gmail.com>
RUN DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
vim curl locales \
&& apt-get clean
RUN locale-gen C.UTF-8 && LANG=C.UTF-8 /usr/sbin/update-locale
ENV LANG C.UTF-8
# Set up the Sync Server
RUN DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
ca-certificates \
adduser \
build-essential \
python-dev \
python-virtualenv \
git-core
RUN adduser --disabled-password --gecos "" app
USER app
WORKDIR /home/app
RUN git clone https://github.com/mozilla-services/syncserver
WORKDIR /home/app/syncserver
RUN make build
EXPOSE 5000
ENTRYPOINT ["/usr/bin/make", "serve"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment