Skip to content

Commit

Permalink
Fix generator to use ubuntu deb files instead of centos rpm.
Browse files Browse the repository at this point in the history
  • Loading branch information
hookenz committed Jun 29, 2015
1 parent 71b4486 commit 2c12e27
Showing 9 changed files with 79 additions and 65 deletions.
15 changes: 7 additions & 8 deletions community/couchbase-server/2.2.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -2,16 +2,9 @@ FROM ubuntu:12.04

MAINTAINER Couchbase Docker Team <[email protected]>

ENV CB_VERSION 3.0.1
ENV CB_RELEASE_URL http://packages.couchbase.com/releases
ENV CB_PACKAGE couchbase-server-community_3.0.1-ubuntu12.04_amd64.deb

# Add couchbase binaries to PATH
ENV PATH $PATH:/opt/couchbase/bin:/opt/couchbase/bin/tools:/opt/couchbase/bin/install

# Install dependancies
RUN apt-get update && \
apt-get install -yq runit wget python3-minimal && \
apt-get install -yq runit wget && \
apt-get autoremove && apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

@@ -21,6 +14,12 @@ ADD scripts/entrypoint.sh /entrypoint.sh
# Add runnit script for couchbase-server
ADD scripts/run /etc/service/couchbase-server/run

ENV CB_VERSION=2.2.0 \
CB_RELEASE_URL=http://packages.couchbase.com/releases \
CB_PACKAGE=couchbase-server-community_2.2.0_x86_64.deb \
PATH=$PATH:/opt/couchbase/bin:/opt/couchbase/bin/tools:/opt/couchbase/bin/install


# Install couchbase
RUN wget -N $CB_RELEASE_URL/$CB_VERSION/$CB_PACKAGE && \
dpkg -i ./$CB_PACKAGE
15 changes: 7 additions & 8 deletions community/couchbase-server/3.0.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -2,16 +2,9 @@ FROM ubuntu:12.04

MAINTAINER Couchbase Docker Team <[email protected]>

ENV CB_VERSION 3.0.1
ENV CB_RELEASE_URL http://packages.couchbase.com/releases
ENV CB_PACKAGE couchbase-server-community_3.0.1-ubuntu12.04_amd64.deb

# Add couchbase binaries to PATH
ENV PATH $PATH:/opt/couchbase/bin:/opt/couchbase/bin/tools:/opt/couchbase/bin/install

# Install dependancies
RUN apt-get update && \
apt-get install -yq runit wget python3-minimal && \
apt-get install -yq runit wget && \
apt-get autoremove && apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

@@ -21,6 +14,12 @@ ADD scripts/entrypoint.sh /entrypoint.sh
# Add runnit script for couchbase-server
ADD scripts/run /etc/service/couchbase-server/run

ENV CB_VERSION=3.0.1 \
CB_RELEASE_URL=http://packages.couchbase.com/releases \
CB_PACKAGE=couchbase-server-community-3.0.1-ubuntu12.04_amd64.deb \
PATH=$PATH:/opt/couchbase/bin:/opt/couchbase/bin/tools:/opt/couchbase/bin/install


# Install couchbase
RUN wget -N $CB_RELEASE_URL/$CB_VERSION/$CB_PACKAGE && \
dpkg -i ./$CB_PACKAGE
15 changes: 7 additions & 8 deletions enterprise/couchbase-server/2.5.2/Dockerfile
Original file line number Diff line number Diff line change
@@ -2,16 +2,9 @@ FROM ubuntu:12.04

MAINTAINER Couchbase Docker Team <[email protected]>

ENV CB_VERSION 3.0.1
ENV CB_RELEASE_URL http://packages.couchbase.com/releases
ENV CB_PACKAGE couchbase-server-community_3.0.1-ubuntu12.04_amd64.deb

# Add couchbase binaries to PATH
ENV PATH $PATH:/opt/couchbase/bin:/opt/couchbase/bin/tools:/opt/couchbase/bin/install

# Install dependancies
RUN apt-get update && \
apt-get install -yq runit wget python3-minimal && \
apt-get install -yq runit wget && \
apt-get autoremove && apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

@@ -21,6 +14,12 @@ ADD scripts/entrypoint.sh /entrypoint.sh
# Add runnit script for couchbase-server
ADD scripts/run /etc/service/couchbase-server/run

ENV CB_VERSION=2.5.2 \
CB_RELEASE_URL=http://packages.couchbase.com/releases \
CB_PACKAGE=couchbase-server-enterprise_2.5.2_x86_64.deb \
PATH=$PATH:/opt/couchbase/bin:/opt/couchbase/bin/tools:/opt/couchbase/bin/install


# Install couchbase
RUN wget -N $CB_RELEASE_URL/$CB_VERSION/$CB_PACKAGE && \
dpkg -i ./$CB_PACKAGE
15 changes: 7 additions & 8 deletions enterprise/couchbase-server/3.0.2/Dockerfile
Original file line number Diff line number Diff line change
@@ -2,16 +2,9 @@ FROM ubuntu:12.04

MAINTAINER Couchbase Docker Team <[email protected]>

ENV CB_VERSION 3.0.1
ENV CB_RELEASE_URL http://packages.couchbase.com/releases
ENV CB_PACKAGE couchbase-server-community_3.0.1-ubuntu12.04_amd64.deb

# Add couchbase binaries to PATH
ENV PATH $PATH:/opt/couchbase/bin:/opt/couchbase/bin/tools:/opt/couchbase/bin/install

# Install dependancies
RUN apt-get update && \
apt-get install -yq runit wget python3-minimal && \
apt-get install -yq runit wget && \
apt-get autoremove && apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

@@ -21,6 +14,12 @@ ADD scripts/entrypoint.sh /entrypoint.sh
# Add runnit script for couchbase-server
ADD scripts/run /etc/service/couchbase-server/run

ENV CB_VERSION=3.0.2 \
CB_RELEASE_URL=http://packages.couchbase.com/releases \
CB_PACKAGE=couchbase-server-enterprise-3.0.2-ubuntu12.04_amd64.deb \
PATH=$PATH:/opt/couchbase/bin:/opt/couchbase/bin/tools:/opt/couchbase/bin/install


# Install couchbase
RUN wget -N $CB_RELEASE_URL/$CB_VERSION/$CB_PACKAGE && \
dpkg -i ./$CB_PACKAGE
15 changes: 7 additions & 8 deletions enterprise/couchbase-server/3.0.3/Dockerfile
Original file line number Diff line number Diff line change
@@ -2,16 +2,9 @@ FROM ubuntu:12.04

MAINTAINER Couchbase Docker Team <[email protected]>

ENV CB_VERSION 3.0.1
ENV CB_RELEASE_URL http://packages.couchbase.com/releases
ENV CB_PACKAGE couchbase-server-community_3.0.1-ubuntu12.04_amd64.deb

# Add couchbase binaries to PATH
ENV PATH $PATH:/opt/couchbase/bin:/opt/couchbase/bin/tools:/opt/couchbase/bin/install

# Install dependancies
RUN apt-get update && \
apt-get install -yq runit wget python3-minimal && \
apt-get install -yq runit wget && \
apt-get autoremove && apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

@@ -21,6 +14,12 @@ ADD scripts/entrypoint.sh /entrypoint.sh
# Add runnit script for couchbase-server
ADD scripts/run /etc/service/couchbase-server/run

ENV CB_VERSION=3.0.3 \
CB_RELEASE_URL=http://packages.couchbase.com/releases \
CB_PACKAGE=couchbase-server-enterprise-3.0.3-ubuntu12.04_amd64.deb \
PATH=$PATH:/opt/couchbase/bin:/opt/couchbase/bin/tools:/opt/couchbase/bin/install


# Install couchbase
RUN wget -N $CB_RELEASE_URL/$CB_VERSION/$CB_PACKAGE && \
dpkg -i ./$CB_PACKAGE
15 changes: 7 additions & 8 deletions enterprise/couchbase-server/4.0.0-beta/Dockerfile
Original file line number Diff line number Diff line change
@@ -2,16 +2,9 @@ FROM ubuntu:12.04

MAINTAINER Couchbase Docker Team <[email protected]>

ENV CB_VERSION 3.0.1
ENV CB_RELEASE_URL http://packages.couchbase.com/releases
ENV CB_PACKAGE couchbase-server-community_3.0.1-ubuntu12.04_amd64.deb

# Add couchbase binaries to PATH
ENV PATH $PATH:/opt/couchbase/bin:/opt/couchbase/bin/tools:/opt/couchbase/bin/install

# Install dependancies
RUN apt-get update && \
apt-get install -yq runit wget python3-minimal && \
apt-get install -yq runit wget && \
apt-get autoremove && apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

@@ -21,6 +14,12 @@ ADD scripts/entrypoint.sh /entrypoint.sh
# Add runnit script for couchbase-server
ADD scripts/run /etc/service/couchbase-server/run

ENV CB_VERSION=feature/beta \
CB_RELEASE_URL=http://packages.couchbase.com/releases \
CB_PACKAGE=couchbase-server-enterprise-4.0.0-beta-ubuntu12.04_amd64.deb \
PATH=$PATH:/opt/couchbase/bin:/opt/couchbase/bin/tools:/opt/couchbase/bin/install


# Install couchbase
RUN wget -N $CB_RELEASE_URL/$CB_VERSION/$CB_PACKAGE && \
dpkg -i ./$CB_PACKAGE
15 changes: 7 additions & 8 deletions enterprise/couchbase-server/4.0.0-dp/Dockerfile
Original file line number Diff line number Diff line change
@@ -2,16 +2,9 @@ FROM ubuntu:12.04

MAINTAINER Couchbase Docker Team <[email protected]>

ENV CB_VERSION 3.0.1
ENV CB_RELEASE_URL http://packages.couchbase.com/releases
ENV CB_PACKAGE couchbase-server-community_3.0.1-ubuntu12.04_amd64.deb

# Add couchbase binaries to PATH
ENV PATH $PATH:/opt/couchbase/bin:/opt/couchbase/bin/tools:/opt/couchbase/bin/install

# Install dependancies
RUN apt-get update && \
apt-get install -yq runit wget python3-minimal && \
apt-get install -yq runit wget && \
apt-get autoremove && apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

@@ -21,6 +14,12 @@ ADD scripts/entrypoint.sh /entrypoint.sh
# Add runnit script for couchbase-server
ADD scripts/run /etc/service/couchbase-server/run

ENV CB_VERSION=feature/dp \
CB_RELEASE_URL=http://packages.couchbase.com/releases \
CB_PACKAGE=couchbase-server-enterprise-4.0.0-dp-ubuntu12.04_amd64.deb \
PATH=$PATH:/opt/couchbase/bin:/opt/couchbase/bin/tools:/opt/couchbase/bin/install


# Install couchbase
RUN wget -N $CB_RELEASE_URL/$CB_VERSION/$CB_PACKAGE && \
dpkg -i ./$CB_PACKAGE
24 changes: 23 additions & 1 deletion generate/generator/generate.go
Original file line number Diff line number Diff line change
@@ -155,7 +155,7 @@ func generateDockerfile(variant DockerfileVariant) error {
// feature/forestdb_bucket.
// so git checkout works
CB_VERSION: variant.VersionWithSubstitutions(),
CB_PACKAGE: variant.rpmPackageName(),
CB_PACKAGE: variant.debPackageName(),
}

templateBytes, err := ioutil.ReadFile(sourceTemplate)
@@ -378,6 +378,28 @@ func (variant DockerfileVariant) rpmPackageName() string {
}
}

// Generate the rpm package name for this variant:
// eg: couchbase-server-enterprise-3.0.2-ubuntu12.04_amd64.deb
func (variant DockerfileVariant) debPackageName() string {
// for 2.x, leave ubuntu12.04 out of the deb name
if variant.isVersion2() {
return fmt.Sprintf(
"%v-%v_%v_x86_64.deb",
variant.Product,
variant.Edition,
variant.Version,
)
} else {
return fmt.Sprintf(
"%v-%v-%v-ubuntu12.04_amd64.deb",
variant.Product,
variant.Edition,
variant.Version,
)
}
}


func (variant DockerfileVariant) versionDir() string {
versionDir := path.Join(
processingRoot,
15 changes: 7 additions & 8 deletions generate/templates/couchbase-server/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -2,16 +2,9 @@ FROM ubuntu:12.04

MAINTAINER Couchbase Docker Team <[email protected]>

ENV CB_VERSION 3.0.1
ENV CB_RELEASE_URL http://packages.couchbase.com/releases
ENV CB_PACKAGE couchbase-server-community_3.0.1-ubuntu12.04_amd64.deb

# Add couchbase binaries to PATH
ENV PATH $PATH:/opt/couchbase/bin:/opt/couchbase/bin/tools:/opt/couchbase/bin/install

# Install dependancies
RUN apt-get update && \
apt-get install -yq runit wget python3-minimal && \
apt-get install -yq runit wget && \
apt-get autoremove && apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

@@ -21,6 +14,12 @@ ADD scripts/entrypoint.sh /entrypoint.sh
# Add runnit script for couchbase-server
ADD scripts/run /etc/service/couchbase-server/run

ENV CB_VERSION={{ .CB_VERSION }} \
CB_RELEASE_URL=http://packages.couchbase.com/releases \
CB_PACKAGE={{ .CB_PACKAGE }} \
PATH=$PATH:/opt/couchbase/bin:/opt/couchbase/bin/tools:/opt/couchbase/bin/install


# Install couchbase
RUN wget -N $CB_RELEASE_URL/$CB_VERSION/$CB_PACKAGE && \
dpkg -i ./$CB_PACKAGE

0 comments on commit 2c12e27

Please sign in to comment.