mirror of
https://github.com/clearlinux/dockerfiles.git
synced 2026-06-29 17:17:05 +00:00
8a8844c3e6
To help analyze the container image size by layers, assume each container image be comprised of: Layer 1: clearlinux:latest Layer 2: swupd update Other layers: the container configurations With this, we can continue to optimize layer size accordingly. Signed-off-by: Qi Zheng <qi.zheng@intel.com>
21 lines
514 B
Docker
21 lines
514 B
Docker
FROM clearlinux:latest
|
|
MAINTAINER william.douglas@intel.com
|
|
|
|
ARG swupd_args
|
|
|
|
RUN swupd update --no-boot-update $swupd_args
|
|
RUN swupd bundle-add postgresql $swupd_args \
|
|
&& rm -rf /var/lib/swupd/*
|
|
|
|
ENV PGDATA /var/lib/pgsql/data
|
|
RUN mkdir -p /run/postgresql && chown -R postgres:postgres /run/postgresql
|
|
RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA"
|
|
VOLUME /var/lib/pgsql/data
|
|
|
|
RUN mkdir -p /usr/local/bin
|
|
COPY bootstrap.sh /usr/local/bin
|
|
ENTRYPOINT ["bootstrap.sh"]
|
|
|
|
EXPOSE 5432
|
|
CMD ["postgres"]
|