Skip to content

Commit 0bd0695

Browse files
committed
first
0 parents  commit 0bd0695

File tree

5 files changed

+92
-0
lines changed

5 files changed

+92
-0
lines changed

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.idea

Diff for: Dockerfile

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
FROM public.ecr.aws/ubuntu/ubuntu:22.04 AS core
2+
3+
ARG DEBIAN_FRONTEND="noninteractive"
4+
5+
# Install git, SSH, and other utilities
6+
RUN set -ex \
7+
&& echo 'Acquire::CompressionTypes::Order:: "gz";' > /etc/apt/apt.conf.d/99use-gzip-compression \
8+
&& apt-get update \
9+
&& apt install -y -qq apt-transport-https gnupg ca-certificates \
10+
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF \
11+
&& apt-get install software-properties-common -y -qq --no-install-recommends \
12+
&& apt-add-repository -y ppa:git-core/ppa \
13+
&& apt-get update \
14+
&& apt-get install git=1:2.* -y -qq --no-install-recommends \
15+
&& git version \
16+
&& apt-get install -y -qq --no-install-recommends openssh-client \
17+
&& mkdir ~/.ssh \
18+
&& touch ~/.ssh/known_hosts \
19+
&& ssh-keyscan -t rsa,dsa,ed25519,ecdsa -H github.com >> ~/.ssh/known_hosts \
20+
&& chmod 600 ~/.ssh/known_hosts \
21+
&& apt-get install -y -qq --no-install-recommends \
22+
apt-utils autoconf automake build-essential zip bzip2 \
23+
bzr curl dirmngr \
24+
e2fsprogs expect fakeroot file g++ gcc gettext gettext-base \
25+
gzip iptables jq less libapr1 libaprutil1 \
26+
llvm locales make mlocate \
27+
netbase openssl patch rsync tar unzip wget \
28+
&& rm -rf /var/lib/apt/lists/*
29+
30+
ENV LC_CTYPE="C.UTF-8"
31+
32+
#=======================End of layer: core =================
33+
34+
35+
FROM core AS tools
36+
37+
38+
# AWS Tools
39+
RUN curl -sS -o /usr/local/bin/kubectl https://s3.us-west-2.amazonaws.com/amazon-eks/1.25.6/2023-01-30/bin/linux/amd64/kubectl \
40+
&& curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash \
41+
&& mv kustomize /usr/local/bin/ \
42+
&& chmod +x /usr/local/bin/kubectl /usr/local/bin/kustomize
43+
44+
ARG APOLLO_ROVER_VERSION="0.14.0"
45+
RUN curl -sSL https://rover.apollo.dev/nix/v${APOLLO_ROVER_VERSION} | sh -s -- --elv2-license accept \
46+
&& mv $HOME/.rover/bin/rover /usr/local/bin/ && ln -sf /usr/local/bin/rover $HOME/.rover/bin/rover
47+
48+
RUN curl -fsSL https://apt.cli.rs/pubkey.asc | tee -a /usr/share/keyrings/rust-tools.asc \
49+
&& curl -fsSL https://apt.cli.rs/rust-tools.list | tee /etc/apt/sources.list.d/rust-tools.list \
50+
&& apt update && apt -y -qq --no-install-recommends install xh
51+
52+
53+
#=======================End of layer: tools =================
54+
FROM tools AS runtimes
55+
56+
57+
# Configure SSH
58+
COPY ssh_config /root/.ssh/config
59+
60+
# docker run --rm -it -v $PWD:/app -v /var/run/docker.sock:/var/run/docker.sock --privileged --workdir /app toolbox docker build -f dataset-test -f docker/graphql-dgs/Dockerfile /app

Diff for: azure-pipelines.yaml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
pool: Default
2+
3+
trigger:
4+
- main
5+
6+
steps:
7+
- script: |
8+
echo "##vso[task.setvariable variable=IMAGE_TAG]$(date +%Y%B%d)"
9+
name: SetImageTag
10+
11+
- task: Docker@2
12+
name: DockerBuild
13+
inputs:
14+
command: build
15+
repository: phamviet/toolbox
16+
arguments: --tag $(ACR_NAME).azurecr.io/toolbox:$(IMAGE_TAG)
17+
tags: $(IMAGE_TAG)
18+
19+
- task: Docker@2
20+
name: DockerPush
21+
inputs:
22+
command: push
23+
repository: toolbox
24+
containerRegistry: ACC-NPRD-GRAPH-ACR-01
25+
tags: $(IMAGE_TAG)

Diff for: build.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env bash
2+
3+
docker buildx build -t phamviet/toolbox . --push

Diff for: ssh_config

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Host *
2+
ConnectTimeout 10
3+
ConnectionAttempts 10

0 commit comments

Comments
 (0)