Skip to content

Commit 04c3978

Browse files
python
1 parent fcfd50f commit 04c3978

4 files changed

Lines changed: 51 additions & 35 deletions

File tree

.env.example

Lines changed: 5 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,5 @@
1-
# Docker Compose Environment Variables for Ubuntu FIPS Base Image
2-
# Copy this file to .env and modify values as needed
3-
4-
# Build Arguments
5-
BUILD_DATE=2025-01-21T00:00:00Z
6-
VERSION=jammy-22.04
7-
8-
# S6 Overlay Configuration
9-
S6_OVERLAY_VERSION=3.1.6.2
10-
S6_OVERLAY_ARCH=x86_64
11-
MODS_VERSION=v3
12-
PKG_INST_VERSION=v1
13-
LSIOWN_VERSION=v1
14-
15-
# Ubuntu Configuration
16-
REL=jammy
17-
ARCH=amd64
18-
19-
# User/Group IDs (default abc user is 911:911)
20-
PUID=911
21-
PGID=911
22-
23-
# Timezone
24-
TZ=Etc/UTC
25-
26-
# Volume paths (adjust to your host paths)
27-
CONFIG_PATH=./config
28-
APP_PATH=./app
29-
30-
# ECR Configuration (if using ECR for base images)
31-
# ECR_ACCOUNT_ID=your-aws-account-id
32-
# ECR_REGION=us-east-1
1+
# ECR Configuration for FIPS Base Image
2+
ECR_ACCOUNT_ID=0123456789012
3+
ECR_REGION=us-east-999
4+
BASE_IMAGE_NAME=ubuntu-fips
5+
BASE_IMAGE_TAG=22.04

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,4 @@ Network Trash Folder
4242
Temporary Items
4343
.apdisk
4444
.jenkins-external
45+
.env

Dockerfile

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
# syntax=docker/dockerfile:1
22

3-
FROM gabemendoza1/cloudcode-baseimage-ubuntu-fips:jammy-22.04
3+
# ECR and base image configuration
4+
ARG ECR_ACCOUNT_ID=1234567890123
5+
ARG ECR_REGION=us-east-999
6+
ARG BASE_IMAGE_NAME=ubuntu-fips
7+
ARG BASE_IMAGE_TAG=22.04
8+
ARG ECR_URI=${ECR_ACCOUNT_ID}.dkr.ecr-fips.${ECR_REGION}.amazonaws.com/${BASE_IMAGE_NAME}:${BASE_IMAGE_TAG}
9+
10+
FROM ${ECR_URI} as ubuntu-fips-base
411

512
# set version labels
613
ARG BUILD_DATE
@@ -14,8 +21,14 @@ ARG S6_OVERLAY_ARCH="x86_64"
1421
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
1522
LABEL maintainer="civisanalytics"
1623

17-
# add s6 overlay
24+
# install required packages and add s6 overlay
1825
RUN \
26+
echo "**** install required packages ****" && \
27+
apt-get update && \
28+
apt-get install -y \
29+
curl \
30+
ca-certificates \
31+
xz-utils && \
1932
echo "**** add s6 overlay ****" && \
2033
curl -o /tmp/s6-overlay-noarch.tar.xz -L \
2134
"https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz" && \
@@ -82,3 +95,24 @@ RUN \
8295
COPY root/ /
8396

8497
ENTRYPOINT ["/init"]
98+
99+
FROM ubuntu-fips-base as ubuntu-fips-base-python
100+
101+
# Install Python 3.10 and development tools
102+
RUN apt-get update && apt-get install -y \
103+
python3.10 \
104+
python3.10-dev \
105+
python3.10-venv \
106+
python3-pip \
107+
build-essential \
108+
libpq-dev \
109+
git \
110+
ca-certificates \
111+
openssl \
112+
libssl-dev && \
113+
rm -rf /var/lib/apt/lists/* && \
114+
# Update CA certificates to ensure SSL/TLS works properly
115+
update-ca-certificates && \
116+
ln -sf /usr/bin/python3.10 /usr/bin/python && \
117+
ln -sf /usr/bin/python3.10 /usr/bin/python3
118+

docker-compose.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
---
22
services:
33
ubuntu-fips:
4+
image: gabemendoza1/cloudcode-baseimage-ubuntu-fips:${VERSION:-jammy-22.04}
45
build:
56
context: .
67
dockerfile: Dockerfile
8+
target: ubuntu-fips-base-python
9+
platforms:
10+
- linux/amd64
711
args:
812
- VERSION=${VERSION:-jammy-22.04}
913
- S6_OVERLAY_VERSION=${S6_OVERLAY_VERSION:-3.1.6.2}
@@ -13,4 +17,8 @@ services:
1317
- LSIOWN_VERSION=${LSIOWN_VERSION:-v1}
1418
- REL=${REL:-jammy}
1519
- ARCH=${ARCH:-amd64}
16-
image: gabemendoza1/cloudcode-baseimage-ubuntu-fips:${VERSION:-jammy-22.04}
20+
- ECR_ACCOUNT_ID=${ECR_ACCOUNT_ID}
21+
- ECR_REGION=${ECR_REGION:-us-east-1}
22+
- BASE_IMAGE_NAME=${BASE_IMAGE_NAME}
23+
- BASE_IMAGE_TAG=${BASE_IMAGE_TAG:-22.04}
24+

0 commit comments

Comments
 (0)