Status thus far
This commit is contained in:
parent
9fd9578dae
commit
09a1c516a4
@ -8,12 +8,12 @@
|
|||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<!--<PropertyGroup>
|
||||||
<ContainerImageName>ActiveAllocator-Integration-SimmonsBank</ContainerImageName>
|
<ContainerImageName>ActiveAllocator-Integration-SimmonsBank</ContainerImageName>
|
||||||
<PublishProfile>DefaultContainer</PublishProfile>
|
<PublishProfile>DefaultContainer</PublishProfile>
|
||||||
<ContainerImageTags>1.0.0;latest</ContainerImageTags>
|
<ContainerImageTags>1.0.0;latest</ContainerImageTags>
|
||||||
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
|
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
|
||||||
</PropertyGroup>
|
</PropertyGroup>-->
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="AutoMapper" Version="12.0.1" />
|
<PackageReference Include="AutoMapper" Version="12.0.1" />
|
||||||
|
45
AAIntegration.SimmonsBank.API/Dockerfile
Normal file
45
AAIntegration.SimmonsBank.API/Dockerfile
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build-env
|
||||||
|
|
||||||
|
WORKDIR /App
|
||||||
|
|
||||||
|
# Copy everything
|
||||||
|
COPY . ./
|
||||||
|
# Restore as distinct layers
|
||||||
|
RUN dotnet restore
|
||||||
|
# Build and publish a release
|
||||||
|
RUN dotnet publish -c Release -o out
|
||||||
|
|
||||||
|
# Build runtime image
|
||||||
|
FROM mcr.microsoft.com/dotnet/aspnet:7.0
|
||||||
|
#RUN apt-get update -yq && apt-get upgrade -yq && apt-get install -yq npm
|
||||||
|
|
||||||
|
#####################
|
||||||
|
#PUPPETEER RECIPE
|
||||||
|
#####################
|
||||||
|
# Install latest chrome dev package and fonts to support major charsets (Chinese, Japanese, Arabic, Hebrew, Thai and a few others)
|
||||||
|
# Note: this installs the necessary libs to make the bundled version of Chromium that Puppeteer
|
||||||
|
# installs, work.
|
||||||
|
#ARG CHROME_VERSION="121.0.6167.139"
|
||||||
|
RUN apt-get update && apt-get -f install && apt-get -y install wget gnupg2 apt-utils
|
||||||
|
RUN wget --no-verbose -O /tmp/chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \
|
||||||
|
&& apt-get update \
|
||||||
|
&& apt-get install -y /tmp/chrome.deb --no-install-recommends --allow-downgrades fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf \
|
||||||
|
&& rm /tmp/chrome.deb
|
||||||
|
|
||||||
|
# Add user, so we don't need --no-sandbox.
|
||||||
|
# same layer as npm install to keep re-chowned files from using up several hundred MBs more space
|
||||||
|
RUN groupadd -r pptruser && useradd -r -g pptruser -G audio,video pptruser \
|
||||||
|
&& mkdir -p /home/pptruser/Downloads \
|
||||||
|
&& chown -R pptruser:pptruser /home/pptruser
|
||||||
|
|
||||||
|
# Run everything after as non-privileged user.
|
||||||
|
USER pptruser
|
||||||
|
#####################
|
||||||
|
#END PUPPETEER RECIPE
|
||||||
|
#####################
|
||||||
|
|
||||||
|
ENV PUPPETEER_EXECUTABLE_PATH "/usr/bin/google-chrome-stable"
|
||||||
|
|
||||||
|
WORKDIR /App
|
||||||
|
COPY --from=build-env /App/out .
|
||||||
|
ENTRYPOINT ["dotnet", "AAIntegration.SimmonsBank.API.dll"]
|
@ -333,6 +333,7 @@ public class PuppeteerService : IPuppeteerService
|
|||||||
var options = new LaunchOptions {
|
var options = new LaunchOptions {
|
||||||
Headless = _config.Headless,
|
Headless = _config.Headless,
|
||||||
IgnoreHTTPSErrors = true,
|
IgnoreHTTPSErrors = true,
|
||||||
|
Args = new [] { "--no-sandbox" }
|
||||||
};
|
};
|
||||||
|
|
||||||
IBrowser browser = await Puppeteer.LaunchAsync(options).WaitAsync(TimeSpan.FromSeconds(_config.BrowserOperationTimeoutSeconds), cancellationToken);
|
IBrowser browser = await Puppeteer.LaunchAsync(options).WaitAsync(TimeSpan.FromSeconds(_config.BrowserOperationTimeoutSeconds), cancellationToken);
|
||||||
|
5
DockerBuild.sh
Normal file
5
DockerBuild.sh
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
cd AAIntegration.SimmonsBank.API/
|
||||||
|
docker build -t aaisb_test -f Dockerfile .
|
||||||
|
cd ../
|
Loading…
x
Reference in New Issue
Block a user