profile_dir_name = 'CustomProfile'
user_data_dir = '{0}\\AppData\\Local\\Google\\Chrome\\User Data\\{1}'.format(os.getenv('USERPROFILE'), profile_dir_name), profile_dir_name)
options.add_argument('--profile-directory={}'.format(profile_dir_name))
options.add_argument( 'user-data-dir={}'.format(user_data_dir))
- Plugin Repositories (plugin dependency must include a version number for this source)
runtimeOnly group: 'com.google.gms', name: 'google-services', version: '3.1.1'
dependencies {
classpath 'com.google.gms:google-services:3.1.1'
// ...
}
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>example</groupId>
<artifactId>basic</artifactId>
<version>0.1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>basic</name>
<description>Demo Springboot app</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.4.RELEASE</version>
<relativePath/>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<finalName>${project.groupId}.${project.artifactId}</finalName>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<finalName>${finalName}</finalName>
</configuration>
</plugin>
</plugins>
</build>
</project>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>${maven-assembly-plugin.version}</version>
<configuration>
<finalName>SWTsample</finalName>
<appendAssemblyId>false</appendAssemblyId>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>${project.groupId}.${mainClass}</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${maven-jar-plugin.version}</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>${project.groupId}.${mainClass}</mainClass>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
</manifest>
</archive>
</configuration>
</plugin>
export IMAGE=telegram-golang
docker build -t $IMAGE -f Dockerfile .
Sending build context to Docker daemon 110.6kB
Step 1/16 : FROM golang:1.15-alpine AS golang
1.15-alpine: Pulling from library/golang
29291e31a76a: Pull complete
e4bc8fc554c3: Pull complete
803daa35ea47: Pull complete
38284154e396: Pull complete
a66f7597198a: Pull complete
Digest: sha256:b58c367d52e46cdedc25ec9cd74cadb14ad65e8db75b25e5ec117cdb227aa264
Status: Downloaded newer image for golang:1.15-alpine
---> 1403af3b6d4a
Step 2/16 : COPY --from=wcsiu/tdlib:1.7-alpine /usr/local/include/td /usr/local/include/td
1.7-alpine: Pulling from wcsiu/tdlib
801bfaa63ef2: Pull complete
908afae84e22: Pull complete
9f0e20223b26: Pull complete
cfba77905c66: Pull complete
Digest: sha256:acf7770ecd4af4eb76294b1f162ebef2d52a2dd84b1a05063ae7859edede1e9b
Status: Downloaded newer image for wcsiu/tdlib:1.7-alpine
---> 41e7544bad92
Step 3/16 : COPY --from=wcsiu/tdlib:1.7-alpine /usr/local/lib/libtd* /usr/local/lib/
---> cf042eae597d
Step 4/16 : COPY --from=wcsiu/tdlib:1.7-alpine /usr/lib/libssl.a /usr/local/lib/libssl.a
---> 1f8ffcc3079e
Step 5/16 : COPY --from=wcsiu/tdlib:1.7-alpine /usr/lib/libcrypto.a /usr/local/lib/libcrypto.a
---> 29e96e50e808
Step 6/16 : COPY --from=wcsiu/tdlib:1.7-alpine /lib/libz.a /usr/local/lib/libz.a
---> ac0b84de0ce9
Step 7/16 : RUN apk add build-base
---> Running in 3c47dbaed054
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/community/x86_64/APKINDEX.tar.gz
(1/20) Installing libgcc (10.3.1_git20210424-r2)
(2/20) Installing libstdc++ (10.3.1_git20210424-r2)
(3/20) Installing binutils (2.35.2-r2)
(4/20) Installing libmagic (5.40-r1)
(5/20) Installing file (5.40-r1)
(6/20) Installing libgomp (10.3.1_git20210424-r2)
(7/20) Installing libatomic (10.3.1_git20210424-r2)
(8/20) Installing libgphobos (10.3.1_git20210424-r2)
(9/20) Installing gmp (6.2.1-r1)
(10/20) Installing isl22 (0.22-r0)
(11/20) Installing mpfr4 (4.1.0-r0)
(12/20) Installing mpc1 (1.2.1-r0)
(13/20) Installing gcc (10.3.1_git20210424-r2)
(14/20) Installing musl-dev (1.2.2-r3)
(15/20) Installing libc-dev (0.7.2-r3)
(16/20) Installing g++ (10.3.1_git20210424-r2)
(17/20) Installing make (4.3-r0)
(18/20) Installing fortify-headers (1.1-r1)
(19/20) Installing patch (2.7.6-r7)
(20/20) Installing build-base (0.5-r3)
Executing busybox-1.33.1-r3.trigger
OK: 197 MiB in 35 packages
Removing intermediate container 3c47dbaed054
---> e3b4eed703af
Step 8/16 : WORKDIR /demo
---> Running in 9b1de5d57cad
Removing intermediate container 9b1de5d57cad
---> cff0fd8f3a60
Step 9/16 : COPY go.mod go.sum ./
---> 9fdc09bc293a
Step 10/16 : RUN go mod download
---> Running in e8dada4a2171
Removing intermediate container e8dada4a2171
---> 30d9ee3a1251
Step 11/16 : COPY . .
---> 3083501ac885
Step 12/16 : RUN go build --ldflags "-extldflags '-static -L/usr/local/lib -ltdjson_static -ltdjson_private -ltdclient -ltdcore -ltdactor -ltddb -ltdsqlite -ltdnet -ltdutils -ldl -lm -lssl -lcrypto -lstdc++ -lz'" -o /tmp/demo-exe main.go
---> Running in f9425e869a8f
Removing intermediate container f9425e869a8f
---> 91b5805aa50d
Step 13/16 : FROM gcr.io/distroless/base:latest
latest: Pulling from distroless/base
fbad7aa519f7: Pull complete
fda4ba87f6fb: Pull complete
Digest: sha256:122585ba4c098993df9f8dc7285433e8a19974de32528ee3a4b07308808c84ce
Status: Downloaded newer image for gcr.io/distroless/base:latest
---> d1bf664ad8e9
Step 14/16 : COPY --from=golang /tmp/demo-exe /demo-runner
---> b1c10dcc70a3
Step 15/16 : EXPOSE 3000
---> Running in f8ba27e21b3b
Removing intermediate container f8ba27e21b3b
---> f658843c43d6
Step 16/16 : ENTRYPOINT [ "/demo-runner" ]
---> Running in 7b232be6b7da
Removing intermediate container 7b232be6b7da
---> 28a62b887596
Successfully built 28a62b887596
Successfully tagged telegram-golang:latest
должно быть типа
думаю после правки синтаксиса insert 'a вопрос с дефолтом решится