# How to use PG17 pg\_tde with Docker?

**URL:** <https://forums.percona.com/t/how-to-use-pg17-pg-tde-with-docker/35765>\
**Category:** PG\_TDE – Transparent Data Encryption (TDE)\
**Tags:** percona, postgres\
**Created:** [December 21, 2024, 2:14am UTC](https://forums.percona.com/t/how-to-use-pg17-pg-tde-with-docker/35765 "2024-12-21T02:14:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![masashi.kayahara](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/masashi.kayahara/32/19492_2.png) [@masashi.kayahara](https://forums.percona.com/u/masashi.kayahara)\
**Post date:** [December 21, 2024, 2:14am UTC](https://forums.percona.com/t/how-to-use-pg17-pg-tde-with-docker/35765/1 "2024-12-21T02:14:30Z")

</div>

Hi,

I created the docker-compose file by referring to the following documentation.  
URL : [Install - pg\_tde documentation](https://percona.github.io/pg_tde/main/install.html#__tabbed_1_)

```yaml
version: '3.8'
services:
  db:
    image: perconalab/pg_tde:latest
    container_name: percona_postgres
    environment:
      POSTGRES_USER: ${POSTGRES_USER:-postgres}
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-foobar}
      POSTGRES_DB: ${POSTGRES_DB:-postgres}
    volumes:
      - postgres_data:/var/lib/postgresql/data
      - ./init:/docker-entrypoint-initdb.d
    ports:
      - "5432:5432"
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U postgres"]
      interval: 10s
      timeout: 5s
      retries: 5

volumes:
  postgres_data:
    driver: local

```

But the Postgres I started is version 16.6.  
I would like to use pg\_tde enabled Docker with postgres17.  
What options should I use for docker build?

# Reference

dockerhub: perconalab/pg\_tde tag:latest

> **[Image Layer Details - perconalab/pg\_tde:latest](https://hub.docker.com/layers/perconalab/pg_tde/latest/images/sha256-f9bade0d5e618246b49c833772d654f4b500c352f3ab6b9f596518fca2608178)**

Thanks

---

<div class="post-metadata">

**Author:** ![lalit.choudhary](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/lalit.choudhary/32/51_2.png) [@lalit.choudhary](https://forums.percona.com/u/lalit.choudhary)\
**Post date:** [December 23, 2024, 7:37am UTC](https://forums.percona.com/t/how-to-use-pg17-pg-tde-with-docker/35765/2 "2024-12-23T07:37:00Z")

</div>

Hello @masashi.kayahara

Thank you for testing and reporting this.  
I see the same issue where the docker installation method uses PostgreSQL-16.  
I reported this issue here:  
[https://perconadev.atlassian.net/browse/PG-1280](https://perconadev.atlassian.net/browse/PG-1280)

We are checking this.

---

<div class="post-metadata">

**Author:** ![masashi.kayahara](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/masashi.kayahara/32/19492_2.png) [@masashi.kayahara](https://forums.percona.com/u/masashi.kayahara)\
**Post date:** [December 23, 2024, 11:08pm UTC](https://forums.percona.com/t/how-to-use-pg17-pg-tde-with-docker/35765/3 "2024-12-23T23:08:32Z")

</div>

Hi, @lalit.choudhary

Thanks for the reply.  
Please check the issue.

Thanks.

---

<div class="post-metadata">

**Author:** ![lalit.choudhary](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/lalit.choudhary/32/51_2.png) [@lalit.choudhary](https://forums.percona.com/u/lalit.choudhary)\
**Post date:** [December 24, 2024, 6:26am UTC](https://forums.percona.com/t/how-to-use-pg17-pg-tde-with-docker/35765/4 "2024-12-24T06:26:58Z")

</div>

Hello @masashi.kayahara

This will be fixed with the next percona postgresql 17.2.1 release.

Please subscribe to bug  
[https://perconadev.atlassian.net/browse/PG-1280](https://perconadev.atlassian.net/browse/PG-1280) Click on start watching option to get the fix update.

 ![image](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/3X/f/8/f8913d55ab5512d72c76d2d4af335d3dde1c80cc.png)
