diff --git a/.claude/settings.local.json b/.claude/settings.local.json new file mode 100644 index 0000000..7bae9de --- /dev/null +++ b/.claude/settings.local.json @@ -0,0 +1,10 @@ +{ + "permissions": { + "allow": [ + "Bash(mkdir:*)", + "Bash(docker build:*)" + ], + "deny": [], + "ask": [] + } +} \ No newline at end of file diff --git a/.github/workflows/publish-couchbase-2.5.yml b/.github/workflows/publish-couchbase-2.5.yml new file mode 100644 index 0000000..f8f18ff --- /dev/null +++ b/.github/workflows/publish-couchbase-2.5.yml @@ -0,0 +1,53 @@ +name: Publish Couchbase 2.5 Docker Image + +on: + push: + branches: [main] + paths: + - 'couchbase-2.5/**' + workflow_dispatch: + +jobs: + build-and-push: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Download Couchbase 2.5.2 RPM + run: | + cd couchbase-2.5 + wget https://launchpadlibrarian.net/90920725/libgpg-error0_1.10-2ubuntu1_amd64.deb + wget https://launchpadlibrarian.net/462496703/libgcrypt11_1.5.0-3ubuntu0.9_amd64.deb + wget https://launchpadlibrarian.net/98077365/libp11-kit0_0.12-2ubuntu1_amd64.deb + wget https://launchpadlibrarian.net/329563761/libtasn1-3_2.10-1ubuntu1.6_amd64.deb + wget https://launchpadlibrarian.net/311120336/libgnutls26_2.12.14-5ubuntu3.14_amd64.deb + wget https://launchpadlibrarian.net/320724516/librtmp0_2.4~20110711.gitc28f1bab-1ubuntu0.1_amd64.deb + wget https://packages.couchbase.com/releases/2.5.2/couchbase-server-enterprise_2.5.2_x86_64.deb + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata + id: meta + uses: docker/metadata-action@v4 + with: + images: ghcr.io/${{ github.repository }}/couchbase-2.5 + tags: | + type=raw,value=2.5 + + - name: Build and push Docker image + uses: docker/build-push-action@v4 + with: + context: couchbase-2.5 + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7fcc085 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.deb +*.rpm diff --git a/couchbase-2.5/Dockerfile b/couchbase-2.5/Dockerfile new file mode 100644 index 0000000..30f06fb --- /dev/null +++ b/couchbase-2.5/Dockerfile @@ -0,0 +1,27 @@ +# Docs: https://docs.couchbase.com/couchbase-manual-2.5/cb-install + +FROM ubuntu:12.04 + +LABEL maintainer="Tien Nguyen Minh " + +COPY *.deb /tmp/ + +RUN dpkg -i /tmp/libgpg-error0_*.deb && \ + dpkg -i /tmp/libgcrypt11_*.deb && \ + dpkg -i /tmp/libp11-kit0_*.deb && \ + dpkg -i /tmp/libtasn1-3_*.deb && \ + dpkg -i /tmp/libgnutls26_*.deb && \ + dpkg -i /tmp/librtmp0_*.deb && \ + dpkg -i /tmp/couchbase-server-enterprise_*.deb && \ + rm /tmp/*.deb + +# Expose ports +# 8091: Web Administration Port +# 8092: Couchbase API Port +# 11210: Internal/External Bucket Port +# 11211: Client interface (proxy) +EXPOSE 8091 8092 11210 11211 + +VOLUME /opt/couchbase/var + +CMD ["/opt/couchbase/bin/couchbase-server"]