Skip to content

Commit 5227f1d

Browse files
author
Tom Augspurger
authored
[CI]: Update container images (#238)
* [CI]: Update container images * moved pctasks-frontend to an aux server * shrink container images a bit
1 parent 9f95843 commit 5227f1d

File tree

9 files changed

+35
-20
lines changed

9 files changed

+35
-20
lines changed

Dockerfile.dev

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@ ENV LANG=C.UTF-8
88

99
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
1010

11-
RUN apt-get update && apt-get install -y software-properties-common
11+
RUN apt-get update && apt-get install -y software-properties-common && \
12+
rm -rf /var/lib/apt/lists/*
1213

1314
RUN add-apt-repository ppa:ubuntugis/ppa && \
1415
apt-get update && \
1516
apt-get install -y build-essential python3-dev python3-pip \
1617
jq unzip ca-certificates wget curl && \
17-
apt-get autoremove && apt-get autoclean && apt-get clean
18+
apt-get autoremove && apt-get autoclean && apt-get clean && \
19+
rm -rf /var/lib/apt/lists/*
1820

1921
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 10
2022

Dockerfile.task_base

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ ENV TZ=UTC
55

66
ENV LC_ALL=C.UTF-8
77
ENV LANG=C.UTF-8
8+
ENV PIP_NO_CACHE_DIR=1
89

910
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
1011

docker-compose.aux.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,22 @@ services:
3838
ports:
3939
- "8514:8080"
4040

41+
frontend:
42+
container_name: pctasks-frontend-app
43+
image: node:16.16-slim
44+
working_dir: /usr/src/app
45+
env_file:
46+
- "pctasks_frontend/.env"
47+
ports:
48+
- "8515:8515"
49+
environment:
50+
- CHOKIDAR_USEPOLLING=true
51+
- CHOKIDAR_INTERVAL=100
52+
- REACT_APP_DEV_AUTH_TOKEN=${REACT_APP_DEV_AUTH_TOKEN:-hunter2}
53+
volumes:
54+
- ./pctasks_frontend:/usr/src/app
55+
command: "npm start"
56+
4157
networks:
4258
default:
4359
# Network created during scripts/setup

docker-compose.yml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -154,22 +154,6 @@ services:
154154
"--proxy-headers"
155155
]
156156

157-
frontend:
158-
container_name: pctasks-frontend-app
159-
image: node:16.16-slim
160-
working_dir: /usr/src/app
161-
env_file:
162-
- "pctasks_frontend/.env"
163-
ports:
164-
- "8515:8515"
165-
environment:
166-
- CHOKIDAR_USEPOLLING=true
167-
- CHOKIDAR_INTERVAL=100
168-
- REACT_APP_DEV_AUTH_TOKEN=${REACT_APP_DEV_AUTH_TOKEN:-hunter2}
169-
volumes:
170-
- ./pctasks_frontend:/usr/src/app
171-
command: "npm start"
172-
173157
# Used to let kind cluster pull local docker images
174158
# See https://kind.sigs.k8s.io/docs/user/local-registry/
175159
local-docker-registry:

docs/development/setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ to inspect ingest results, and the frontend.
5454
| STAC API | <http://localhost:8513> |
5555
| STAC Browser | <http://localhost:8514> |
5656

57-
You can avoid building or bringing up the STAC API and STAC Browser
57+
You can avoid building or bringing up the frontend, STAC API, and STAC Browser
5858
servers by using the flag `--no-aux-servers` in `scripts/setup`,
5959
`scripts/update`, and `scripts/server`. This can save on build time
6060
and memory footprint if you are not using those services.

pctasks/.dockerignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
**/.envrc
2+
**/.direnv
3+
**/__pycache__
4+
**/.mypy_cache
5+
**/.pytest_cache
6+
**/.terraform
7+
**/node_modules
8+
**/.terraform

pctasks/run/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ RUN apt-get update && \
44
apt-get install -y build-essential git
55

66
ENV CURL_CA_BUNDLE /etc/ssl/certs/ca-certificates.crt
7+
ENV PIP_NO_CACHE_DIR=1
78

89
WORKDIR /opt/src
910

pctasks/server/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ FROM python:3.9-slim
33
ARG DEVELOPMENT=FALSE
44

55
RUN apt-get update && \
6-
apt-get install -y build-essential git
6+
apt-get install -y build-essential git && \
7+
rm -rf /var/lib/apt/lists/*
78

89
ENV CURL_CA_BUNDLE /etc/ssl/certs/ca-certificates.crt
10+
ENV PIP_NO_CACHE_DIR=1
911

1012
WORKDIR /opt/src
1113

scripts/update

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ while [[ $# -gt 0 ]]; do case $1 in
7777
;;
7878
--no-aux-servers)
7979
BUILD_AUX_SERVERS=""
80+
BUILD_FRONTEND=""
8081
shift
8182
;;
8283
--task)

0 commit comments

Comments
 (0)